Package: wheelhouse-uploader
Upload/download wheels to/from cloud storage using Apache Libcloud.
Helps package maintainers build wheels for their packages and upload
them to PyPI.The cloud storage containers are typically populated by Continuous
Integration servers that generate and test binary packages on various
platforms (Windows and OSX for several versions and architectures for
Python). At release time the project maintainer can collect all the
generated package for a specific version of the project and upload them
all at once to PyPI.Installationpipinstallwheelhouse-uploaderUsageThe canonical use case is:Continuous Integration (CI) workers build and test the project
packages for various platforms and versions of Python, for instance
using the commands:pipinstallwheelpythonsetup.pybdist_wheelCI workers usewheelhouse-uploaderto upload the generated
artifacts to one or more cloud storage containers (e.g. one container
per platform, or one for the master branch and the other for release
tags):python-mwheelhouse_uploaderuploadcontainer_nameThe project maintainer uses thewheelhouse-uploaderdistutils
extensions to fetch all the generated build artifacts for a specific
version number to its localdistfolder and upload them all at
once to PyPI when making a release.pythonsetup.pysdistfetch_artifactsupload_allUploading artifact to a cloud storage containerUse the following command:python-mwheelhouse_uploaderupload\--username=mycloudaccountid--secret=xxx\--local-folder=dist/my_wheelhouseor:exportWHEELHOUSE_UPLOADER_USERNAME=mycloudaccountidexportWHEELHOUSE_UPLOADER_SECRET=xxxpython-mwheelhouse_uploaderupload--local-folderdist/my_wheelhouseWhen used in a CI setup such ashttp://travis-ci.orgorhttp://appveyor.com, the environment variables are typically configured
in the CI configuration files such as.travis.ymlorappveyor.yml. The secret API key is typically encrypted and exposed
with asecure:prefix in those files.The files in thedist/folder will be uploaded to a container namedmy_wheelhouseon theCLOUDFILES(Rackspace) cloud storage
provider.You can pass a custom--providerparam to select the cloud storage
from the list ofsupported
providers.Assuming the container will be published as a static website using the
cloud provider CDN options, theuploadcommand also maintains anindex.htmlfile with links to all the files previously uploaded to
the container.It is recommended to configure the container CDN cache TTL to a shorter
than usual duration such as 15 minutes to be able to quickly perform a
release once all artifacts have been uploaded by the CI servers.Fetching artifacts manuallyThe following command downloads items that have been previously
published to a web page with an index with HTML links to the project
files:python-mwheelhouse_uploaderfetch\--version=X.Y.Z--local-folder=dist/\project-namehttp://wheelhouse.example.org/Uploading previously archived artifacts to PyPI (deprecated)DEPRECATION NOTICE: while the following still works, you are advised
to use the alternative tool:twinethat makes it easy to
script uploads of packages to PyPI without messing around with distutils
andsetup.py.Ensure that thesetup.pyfile of the project registers thewheelhouse-uploaderdistutils extensions:cmdclass={}try:# Used by the release manager of the project to add support for:# python setup.py sdist fetch_artifacts upload_allimportwheelhouse_uploader.cmdcmdclass.update(vars(wheelhouse_uploader.cmd))exceptImportError:pass...setup(...cmdclass=cmdclass,)Put the URL of the public artifact repositories populated by the CI
workers in thesetup.cfgfile of the project:[wheelhouse_uploader]artifact_indexes=http://wheelhouse.site1.org/http://wheelhouse.site2.org/Fetch all the artifacts matching the current version of the project as
configured in the localsetup.pyfile and upload them all to PyPI:pythonsetup.pyfetch_artifactsupload_allNote: this will reuse PyPI credentials stored in$HOME/.pypircifpython setup.py registeroruploadwere called previously.TODOtest on as many cloud storage providers as possible (please send an
email toolivier.grisel@ensta.orgif you can make it work on a
non-Rackspace provider),check that CDN activation works everywhere (it’s failing on Rackspace
currently: need to investigate) otherwise the workaround is to enable
CDN manually in the management web UI,make it possible to fetch private artifacts using the cloud storage
protocol instead of HTML index pages.