build

build ignores specified version value

build ignores specified version value Question: I am building a python project using this pyproject.toml file [tool.poetry] name = "my_package" version = "1.0.0" description = "My precious" readme = "README.md" [tool.poetry.dependencies] pandas = "1.4.3" numpy = "1.22.4" scikit-learn = "1.1.2" xgboost = "1.6.1" holidays = "0.14.2" matplotlib = "3.4.3" matplotlib-inline = "0.1.6" numba = "0.56.4" …

Total answers: 1

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

Use config file for pip within build

Use config file for pip within build Question: I am building a package from source files. If I run with the argument –no-isolation It successfully builds. However, if I try to build in an isolated environment it fails trying to install packages [SSLCertVerificationError]. I have solved in my normal environment by adding the following to …

Total answers: 1

Remove parent directories in python build source archive

Remove parent directories in python build source archive Question: I have the following setup for my python package: my_package ┣ src ┃ ┗ __init__.py ┣ setup.cfg ┗ pyproject.toml The __init__.py is empty, the pyproject.toml and the setup.cfg contain example output from the PyPi documentation page (content shown below). Now, for uploading to PyPi and for …

Total answers: 2

No module named 'version' during building package

No module named 'version' during building package Question: I’m trying to build a custom python package, with pyproject.toml. I added a setup.py just for a development and editable environment. (see https://snarky.ca/what-the-heck-is-pyproject-toml/) pyproject-toml file : [build-system] requires = ["setuptools == 44.1.1", "wheel"] build-backend = "setuptools.build_meta" [tool.pytest.ini_options] testpaths = ["tests"] I upgraded python build with python3 -m …

Total answers: 2

Issues compiling mediapipe with pyinstaller on macos

Issues compiling mediapipe with pyinstaller on macos Question: I have issues compiling a project with mediapipe via pyinstaller on macos so far I tried: pyinstaller –windowed –noconsole pose_edge.py pyinstaller –onefile –windowed –noconsole pose_edge.py pyinstaller –noconsole pose_edge.py The .app does not open, and if I try the unix exec, I get Traceback (most recent call last): …

Total answers: 2

Which Python version to be used for building PyPi package?

Which Python version to be used for building PyPi package? Question: I’m building PyPi package, which is compatible with Python 3.8 and higher. That means that the minimum version of Python is 3.8, so I build the package in Python 3.8 environment. My question is should I build package separately for Python 3.8 and 3.9? …

Total answers: 3

Automating Python package release process

Automating Python package release process Question: I’ve just started an open source Python project that I hope might be popular one day. At the moment to release a new version I have to do a few things. Test all the things. Edit mypackage.VERSION variable, which setup.py imports from __init__ Build packages and wheels with python …

Total answers: 3

VSCode: The term 'python' is not recognized…but py works

VSCode: The term 'python' is not recognized…but py works Question: I just installed python on VS Code and I can’t run any python code using python command. python command: Running the code seems to run python command by default and it does not recognize it. When I right click and choose Run Code it complains: …

Total answers: 10