setuptools

How do I distribute fonts with my python package using python -m build?

How do I distribute fonts with my python package using python -m build? Question: Problem statement My package relies on matplotlib to use a specific font which may not be installed on the target device. I’m trying to install ttf font files from the source distribution to the matplotlib fonts/ttf directory, after building the package. …

Total answers: 1

Is there a way to include shell scripts in a Python package with pyproject?

Is there a way to include shell scripts in a Python package with pyproject? Question: Previously with setup.py you could just add setuptools.setup( … scripts=[ "scripts/myscript.sh" ] ) and the shell script was just copied to the path of the environment. But with the new pyproject scpecification, this seems to not be possible any more. …

Total answers: 1

Is it possible to pass arguments to setup.py while creating own .whl file?

Is it possible to pass arguments to setup.py while creating own .whl file? Question: I often update my own libs using in my projects and i want to automate it so i wrote a script which calls command which builds a .whl lib by os.system and setup.py module gets build params by sys.argv but it …

Total answers: 1

Get Path to Python File Before Installation

Get Path to Python File Before Installation Question: I have a project that includes c++ binaries and python scripts, it’s setup such that it should be installed using setuptools. One of the python files is intended to be both used as a script " python3 script_name.py params and for it’s primary function to be used …

Total answers: 2

Python packaging with setup.py does ignore manifest specifications

Python packaging with setup.py does ignore manifest specifications Question: I’m currently trying to pack a module that uses precompiled *.pyd files from a swig routine. The process for the user is supposed to be: install base library (C, C++); directories linked in the environment variables; here are also the *.pyd files. get python package; open …

Total answers: 1

What is the difference between a "pip wheel -e" and "pip install -e"?

What is the difference between a "pip wheel -e" and "pip install -e"? Question: Building a C-extension library to python, I noticed that building it with with wheel (and then install the *.whl) versus a direct install, gives very different results and build artifacts. Building with: pip install -e . We get an entry for …

Total answers: 1

Identify forks of a Python package from within

Identify forks of a Python package from within Question: I have a Python package (a PyQt GUI app) on Github, published via PyPI. It has a crash reporting facility. Ever once in a while, I receive crashes that are subtly, but unmistakably inconsistent with my code. Examples: a "class X not found in module Y" …

Total answers: 1

Why ist setuptools not installing install_requires

Why ist setuptools not installing install_requires Question: My Python package is installed using setuptools configured with a setup.cfg file. In it requirements are specified: [options] packages = find: zip_safe = True include_package_data = True install_requires = gmsh >= 4.10.5 matplotlib >= 3.6.1 numpy >= 1.23.3 When installing the package via pip the package to a …

Total answers: 1