Skip to main content

Upload source distributions to your PyPI server.

Project description

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Description: UNKNOWN Platform: UNKNOWN Classifier: Environment :: Console Classifier: Intended Audience :: Developers Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: MIT License Classifier: Natural Language :: English Classifier: Operating System :: Unix Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Description-Content-Type: ### FORKED FROM https://github.com/ignacysokolowski/pypi-uploader

#### Fixed AttributeError: Module Pip has no attribute ‘main’

PyPI Uploader

https://pypip.in/v/pypi-uploader/badge.png https://pypip.in/d/pypi-uploader/badge.png

Upload source distributions of your requirements to your PyPI server.

The problem

If you are using a custom PyPI server as a proxy and want to upload some packages there, it’s not easy. For each package, you need to download its source and upload it using setup.py script:

# Uploading requests==2.0.0
$ git clone https://github.com/kennethreitz/requests
$ cd requests
$ git checkout v2.0.0
# Assuming you have 'internal' index-server configured in your '~/.pypirc'.
$ python setup.py sdist upload -r internal
# Uploading coverage==3.5
$ cd ..
$ git clone https://github.com/nedbat/coveragepy
$ cd coveragepy
$ git checkout coverage-3.5
$ python setup.py sdist upload -r internal

You could also download the packages directly into the PyPI’s index directory.

$ ssh pypi-mirror.yourdomain.com
$ pip install requests==2.0.0 coverage==3.5 -d ~/.packages

If there’s more than one package, you could use a requirements file.

$ scp requirements.txt pypi-mirror.yourdomain.com:.
$ ssh pypi-mirror.yourdomain.com
$ pip install -r requirements.txt -d ~/.packages

But it’s still too much. You should be able to do it with one command. And what if you don’t have SSH access to the PyPI server host?

The solution

One command for download and upload.

Upload packages by name

$ pypiupload packages mock==1.0.1 requests==2.2.1 -i internal

Upload packages from requirements file

$ pypiupload requirements requirements.txt -i internal

Upload source distribution files

$ pypiupload files packages/mock-1.0.1.tar.gz \
  packages/requests-2.2.1-py2.py3-none-any.whl -i internal

More options

$ pypiupload --help
$ pypiupload <command> --help

Supported PyPI servers

Tested only on pypiserver.

Installation

Install from PyPI:

$ pip install pypi-uploader

Or go to the root directory with setup.py script and install it:

$ python setup.py install

Documentation

Documentation is available at https://pypi-uploader.readthedocs.org

Source

Source is available at https://github.com/ignacysokolowski/pypi-uploader

License

PyPI Uploader is licensed under the MIT license.

Changelog

Version 1.1.0

  • Adapt to newer versions of pip: use pip download instead of pip install for downloading packages, and --no-binary :all: instead of --no-use-wheel to not use wheel archives.

Version 1.0.0

  • Added --no-use-wheel option

Version 0.1.0

First release

Issues and contributing

Please report any issues on GitHub at https://github.com/ignacysokolowski/pypi-uploader/issues

Or contribute by submitting a pull request with your changes following these rules:

  • Follow PEP 8 rules

  • Follow PEP 257 rules

  • Follow The Zen of Python

  • Test your commits

  • Write meaningful commit messages

  • Keep the documentation up-to-date

To run tests and build the docs, you have to install additional packages:

$ python setup.py develop
$ pip install -r requirements_dev.txt

Running tests:

$ tox

Building documentation:

$ cd docs
$ make html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi-uploader2-1.1.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypi_uploader2-1.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pypi-uploader2-1.1.1.tar.gz.

File metadata

  • Download URL: pypi-uploader2-1.1.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pypi-uploader2-1.1.1.tar.gz
Algorithm Hash digest
SHA256 70ebb574686d0a31e228e472e19d6a44af615752548349be57c4987428e31ee8
MD5 04bee35cbe6dc2814790a919f405c1e3
BLAKE2b-256 b9f7adb4c27236e5e9678fa37575b30e077093f53d76f07f6dc5870c2a09265d

See more details on using hashes here.

File details

Details for the file pypi_uploader2-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pypi_uploader2-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pypi_uploader2-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a81ca79c083bd71992b2b7def930a23600edc62bb2233fd3b51cfa883a222ad
MD5 414e0db63468277881a3ad5f797ed654
BLAKE2b-256 a07c5449c86f68eea2de76e6d73fd942b2187d3e4956593313416fab43e6115d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page