easy_install (setup.py install) doesn't ignore pre-releases
See original GitHub issueIt looks like install_requires causes the latest version of a package, even pre-releases, to be installed. If I set up a simple setup.py
file with Matplotlib as a dependency:
from setuptools import setup
setup(install_requires=['matplotlib'])
it will currently download and install 2.0.0b4:
$ python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to UNKNOWN.egg-info/requires.txt
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing top-level names to UNKNOWN.egg-info/top_level.txt
writing UNKNOWN.egg-info/PKG-INFO
reading manifest file 'UNKNOWN.egg-info/SOURCES.txt'
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install
creating build
creating build/bdist.macosx-10.6-x86_64
creating build/bdist.macosx-10.6-x86_64/egg
creating build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/PKG-INFO -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/requires.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/top_level.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/UNKNOWN-0.0.0-py3.5.egg' and adding 'build/bdist.macosx-10.6-x86_64/egg' to it
removing 'build/bdist.macosx-10.6-x86_64/egg' (and everything under it)
Processing UNKNOWN-0.0.0-py3.5.egg
Copying UNKNOWN-0.0.0-py3.5.egg to /Users/tom/miniconda3/envs/empty/lib/python3.5/site-packages
Adding UNKNOWN 0.0.0 to easy-install.pth file
Installed /Users/tom/miniconda3/envs/empty/lib/python3.5/site-packages/UNKNOWN-0.0.0-py3.5.egg
Processing dependencies for UNKNOWN==0.0.0
Searching for matplotlib
Reading https://pypi.python.org/simple/matplotlib/
Downloading https://pypi.python.org/packages/36/01/8fc19448d018b5a58cf658a4521fa65026e1110816d90eb79144e3ee75e9/matplotlib-2.0.0b4.tar.gz#md5=250b086c52b89844ef61dd5ed0b398bb
Ideally, this should behave like pip and only pick the latest real release (pip has a --pre flag to select pre-releases).
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:9 (6 by maintainers)
Top Results From Across the Web
How to exclude or ignore package pre-releases with setuptools?
I was using setuptools with a tensorflow package dependency. I noticed when I run setup.py install , it finds tensorflow 1.13.0rc2 .
Read more >Packaging and distributing projects
pip and other modern Python package installers ignore pre-releases by default when deciding which versions of dependencies to install. Local version identifiers ...
Read more >setuptools 3.4.2 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >Specifying Your Project's Version - Setuptools
Tagging and “Daily Build” or “Snapshot” Releases#. Warning. Please note that running python setup.py ... directly is no longer considered a ...
Read more >pip install — pip 10.0.0.dev0 documentation
Local directory (which must contain a setup.py , or pip will report an error). ... installed (but see here for an exception regarding...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Easy-install was implemented long before pep 440, back to around 2005. Back then, the version handling was more simple, with basic rules around version parsing and ordering. Easy-install would install what you asked for within the ranges you specified. There wasn’t another ‘pre-release’ dimension (except that
dev
,a
,b
were considered less than 0).I don’t think there’s value at this point in implementing this behavior. Installation of packages to satisfy
setup_requires
is now backed by pip and easy-install is deprecated. Just use pip, which honors the pep.Yes!
Yes. I personally don’t distinguish between a deployable application and a library, so I use setuptools even for my own personal website, and so pipenv is a bad fit for my workflows. That said, it’s perfectly reasonable if not preferable for someone developing an application to use a separate technique such as pipenv.