Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retire modal-client PyPI package: Step two #2557

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,6 @@ jobs:
- name: Build wheel
run: python setup.py bdist_wheel

- name: Create alias package
run: inv create-alias-package

- name: Build alias package
working-directory: alias-package
run: python setup.py bdist_wheel

- name: Set the Modal environment
run: modal config set-environment main

Expand All @@ -236,11 +229,4 @@ jobs:
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/* --non-interactive

- name: Upload alias package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
working-directory: alias-package
run: twine upload dist/* --non-interactive
run: twine upload dist/* --non-interactive
51 changes: 0 additions & 51 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,57 +234,6 @@ def update_build_number(ctx, new_build_number: Optional[int] = None):
)


@task
def create_alias_package(ctx):
os.makedirs("alias-package/modal", exist_ok=True)
with open("alias-package/setup.py", "w") as f:
f.write(
f"""\
{copyright_header_full}
from setuptools import setup
setup(version="1.0.0")
"""
)
with open("alias-package/setup.cfg", "w") as f:
f.write(
"""\
[metadata]
name = modal-client
author = Modal Labs
author_email = [email protected]
description = Legacy name for the Modal client
long_description = This is a legacy compatibility package for the `modal` client library.
This package is no longer functional. Please install the `modal` package instead.
long_description_content_type = text/markdown
project_urls =
Homepage = https://modal.com

[options]
packages = find:
"""
)
with open("alias-package/pyproject.toml", "w") as f:
f.write(
"""\
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
"""
)
with open("alias-package/modal/__init__.py", "w") as f:
f.write(
"""\
error = '''
######################################################################
# The legacy `modal-client` PyPI package is no longer being updated. #
# Please install the `modal` package instead (`pip install modal`). #
######################################################################
'''
raise Exception(error)
"""
)


@task
def type_stubs(ctx):
# We only generate type stubs for modules that contain synchronicity wrapped types
Expand Down
Loading