pypi

Pip doesn't install latest available version from pypi (argparse in this case)

无人久伴 提交于 2019-12-04 10:07:41
问题 The problem I worked on some python projects lately and had lots of problems with pip not installing the latest versions of some requirements. I am on osx and and I used brew to install Python 2.7.6 . In the project I'm working on, we simply pip install -r requirements.txt . In the current case, I needed to install argparse==1.2.1 . This is the actual latest version shown on the pypi website Here's my output Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 4)) Could not

How do I include non-.py files in PyPI?

孤街浪徒 提交于 2019-12-04 06:42:08
I am a newb to PyPI...so let me qualify with that. I am trying to put a package on PyPI but having a bit of trouble when I try to install it with pip. When I upload the file to PyPI, I get a warning (but the setup.py script finishes with not fatal errors and a 200 status): 'my_package/static/my_folder' not a regular file -- skipping And then when I go to install it in pip, I get an error: "error: can't copy 'my_package/static/my_folder': doesn't exist or not a regular file. From other answers on SO, I've tried changing up my MANIFEST.in and my setup.py files, with no luck. Here is my current

Best workflow and practices for releasing a new python package version on github and pypi

ぐ巨炮叔叔 提交于 2019-12-04 06:17:29
I was wondering what is the best procedure or practices for releasing a new python package version on pypi and github. For example, is this the typical workflow a major python package would follow? On master branch, increment version number Set version='1.5.0' in setup.py Set __version__ = '1.5.0' in package __init__.py Update CHANGELOG.md with new version Run tox locally to verify package Push changes git push origin master Create tag git tag v1.5.0 -m "Release v1.5.0" Push tag git push origin v1.5.0 Wait for Travis CI build to finish. Build package python setup.py sdist bdist_wheel Verify

Installing my sdist from PyPI puts the files in unexpected places

梦想与她 提交于 2019-12-04 04:44:04
My problem is that when I upload my Python package to PyPI, and then install it from there using pip, my app breaks because it installs my files into completely different locations than when I simply install the exact same package from a local sdist. Installing from the local sdist puts files on my system like this: /Python27/ Lib/ site-packages/ gloopy-0.1.alpha-py2.7.egg/ (egg and install info files) data/ (images and shader source) doc/ (html) examples/ (.py scripts that use the library) gloopy/ (source) This is much as I'd expect, and works fine (e.g. my source can find my data dir,

twine not found (-bash: twine: command not found)

笑着哭i 提交于 2019-12-04 04:26:09
I am trying to use twine to publish my first python package on pypi (of course will add on test-pypi first). I followed the official guideline on https://packaging.python.org/tutorials/packaging-projects/ . But for some reason, twine is not found or not properly installed. I installed twine using: pip install twine "pip list" says twine is installed on pip. After I upgraded twine and everything, when I tried to run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* then it says that twine is not found at all: -bash: twine: command not found . My system is mac (high sierra) and

How do I upload a Universal Python Wheel for Python 2 and 3?

不打扰是莪最后的温柔 提交于 2019-12-04 02:39:33
I have a package on PyPi and when preparing a new release I build the source distribution, build the wheel and upload, all with setuptools. However, I've found it only uploads the wheel for the Python version used in the upload command ( python and python3 ). Here are the steps I'm taking: python3 setup.py sdist python3 setup.py bdist_wheel --universal python3 setup.py sdist bdist_wheel upload According to the Python Packaging User Guide : "Universal Wheels" are wheels that are pure python (i.e. contains no compiled extensions) and support Python 2 and 3 So that seems to be the right thing for

How to upload a pristine Python package to PyPI?

人走茶凉 提交于 2019-12-04 01:57:22
What's the magic " python setup.py some_incantation_here " command to upload a package to PyPI, in a form that can be downloaded to get the original package in its original form? I have a package with some source and a few image files (as package_data). If I do " setup.py sdist register upload ", the .tar.gz has the image files excluded. If I do " setup.py bdist_egg register upload ", the egg contains the images but excludes the setup.py file. I want to be able to get a file uploaded that is just the entirety of my project -- aka " setup.py the_whole_freaking_thing register upload ". Perhaps

Pip install from pypi works, but from testpypi fails (cannot find requirements)

不羁的心 提交于 2019-12-03 16:06:58
问题 I'm trying to create my first python package. To not bungle the whole deal, I've been attempting to upload it to the testpypi servers. That seems to go fine (sdist creates and upload doesn't show any errors). However, when I try to install it to a new virtualenv from https://testpypi.python.org/pypi, it complains about my install requirements, e.g.: pip install -i https://testpypi.python.org/pypi poirot Collecting poirot Downloading https://testpypi.python.org/packages/source/p/poirot/poirot

Searching PyPI by topic

人盡茶涼 提交于 2019-12-03 15:37:46
问题 For every python package you can specify a list of classifiers. Among others there is a Topic classifier, that puts the package in the specified categories that can be browsed on PyPI. For example, numpy has the following topics: Topic :: Software Development Topic :: Scientific/Engineering Is there a way to search by topic programmatically using pip search or other third-party libraries? 回答1: You can search PyPI by classifier via the XMLRPC API, using the browse() method: try: import

how to set bug tracker url in setup.py script

时间秒杀一切 提交于 2019-12-03 10:55:16
问题 I have just discovered the pypi web UI have a field 'Bug tracker URL' in edit of egg metadata. This field exists so I guess it is supported in setup.py but I can't find anything about this using google. So the question how do I set up this field in my setup.py so when doing a dist release on pypi it can be automaticly filled. 回答1: The entry is called bugtrack_url , but it's not being picked up from setup.py . From context and code I understand it was intended to be used through-the-web on