I’m looking at a setup.py with this syntax: I understand the idea of the “>=” where h5py should be at least version 2.9, but I cannot for the life of me understand the =mpi* afterwards. Is it saying the version should somehow match the mpi version, while also being at least 2.9? I canR…
Tag: setup.py
pip ignores python_requires field in setup
I have the following in my setup.cfg file: Problem is that I created an enviroment with Python 3.7 and installation had no problems. Installation command: Shouldn’t pip require a Python 3.8 enviroment? Here is the test.PyPI link: PyPI project, and here the repo: GitHub repo I know that the setup.cfg fil…
Install pre-commit on package install in setup.py file
I would like, when I install my python package with pip install ., that the command pre-commit install be run as well as everything else in the setup file. Here is my setup.py file where I try to execute this: However, when I run this, pre-commit install does not get run. I’m mostly taking inspiration f…
tkinter inter-windows drag and drop support
I’m trying to help the owner of tkdnd generate a wheel and distribute it to Pypi so users could simply install the tkdnd extension with a simple pip install TkinterDnD2. I’m after this ‘challange’ for the last two days but could not solve it by myself so far, but I’m sure someone…
ModuleNotFoundError with setup.py using a compiled pyc module
I can normally import a compiled .pyc module as well as .py, but when trying to package a simple project with setup.py, I’m getting the ModuleNotFoundError exception for the compiled .pyc module. Because this is only happening when using setup.py, otherwise is working fine, I don’t know if there&#…
Dependencies of Django Project
I created a setup.py and setup.cfg like explained in the Django docs. Now I am unsure how to add dependencies to my project. If someone installs my code, other tools like Pillow should automatically get installed. I read that install_requires is the right way (not requirements.txt), but how to specify this? T…
Passing arguments to an entry point python script using argparser
I am looking to pass a user entered arguments from the command line to an entry point for a python script. Thus far I have tried to used argparse to pass the arguments from the command line to the test.py script. When I try to pass the arguments they are not recognised and I recieve the following error. load_…
Create wheel without building dependencies
I have a sample project: setup.py is just Then when I call pip wheel ., it automatically makes a wheel for numpy. Can I make it not do that? It’s my understanding that when you install a wheel, it will automatically go download and install any missing dependencies. Is the numpy wheel needed for making m…
How can I include package_data without a MANIFEST.in file?
How can I include package_data for sdist without a MANIFEST.in file? My setup.py looks like this: Versions: I just can’t get foo/bar.txt included. Or is this blog post still true? http://blog.codekills.net/2011/07/15/lies,-more-lies-and-python-packaging-documentation-on–package_data-/ Over the las…
Using an extra python package index url with setup.py
Is there a way to use an extra Python package index (ala pip –extra-index-url pypi.example.org mypackage) with setup.py so that running python setup.py install can find the packages hosted on pypi.example.org? Answer If you’re the package maintainer, and you want to host one or more dependencies f…