MCPcopy Create free account
hub / github.com/CloverHealth/temporal-sqlalchemy / _pypi_push

Function _pypi_push

deploy.py:19–40  ·  view source on GitHub ↗

Push created package to PyPI. Requires the following defined environment variables: - TWINE_USERNAME: The PyPI username to upload this package under - TWINE_PASSWORD: The password to the user's account Args: dist (str): The distribution to push. Must be

(dist)

Source from the content-addressed store, hash-verified

17
18
19def _pypi_push(dist):
20 """Push created package to PyPI.
21
22 Requires the following defined environment variables:
23 - TWINE_USERNAME: The PyPI username to upload this package under
24 - TWINE_PASSWORD: The password to the user's account
25
26 Args:
27 dist (str):
28 The distribution to push. Must be a valid directory; shell globs are
29 NOT allowed.
30 """
31 # Register all distributions and wheels with PyPI. We have to list the dist
32 # directory and register each file individually because `twine` doesn't
33 # handle globs.
34 for filename in os.listdir(dist):
35 full_path = os.path.join(dist, filename)
36 if os.path.isfile(full_path):
37 # This will fail if the project has never been uploaded, so use check=false
38 _shell('twine register ' + shlex.quote(full_path), check=False)
39
40 _shell('twine upload ' + shlex.quote(dist + '/*'))
41
42
43def deploy(target):

Callers 1

deployFunction · 0.85

Calls 1

_shellFunction · 0.85

Tested by

no test coverage detected