I have a third-party package which has a setup.py
file that calls setup()
in the standard way, passing test_requires
, install_requires
and extras_require
. (It does not use a requirements.txt
file.)
I am running a Windows machine (on Appveyor) and pip install
is notoriously poor on Windows with some of the packages. I would like to use Conda.
It seems to me, the ideal way to proceed is:
install
or test
command, confident that it will check its requirements, and not find anything it needs to install.I thought python setup.py --requires
might do the trick, but it is poorly documented and is returning nothing.
If this a reasonable approach? If so, is there a way of asking setup.py to evaluated its dependencies, and list them without installing them.
Pip Check Command – Check Python Dependencies After Installation. Because pip doesn't currently address dependency issues on installation, the pip check command option can be used to verify that dependencies have been installed properly in your project. For example: $ pip check No broken requirements found.
Use the pipdeptree utility to gather a list of all dependencies, create a requirements. txt file listing all the dependencies, and then download them with the pip download command. Get the list of dependencies for a package from the setup.py file.
The dependencies of the installed Python packages can be listed using the built-in pip show command. Alternatively the dependencies can be shown as a tree structure using the pipdeptree command. In this note i will show several examples of how to list dependencies of the installed Python packages.
python setup.py egg_info
will write a package_name.egg-info/requires.txt
file which contains the dependencies you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With