pyproject.toml

pip ignores pyproject.toml

pip ignores pyproject.toml Question: [build-system] requires = ["wheel", "setuptools>=18.0", "cython>=0.29.0", "numpy>=1.20"] I package via python setup.py sdist bdist_wheel, then twine upload –repository testpypi dist/*, and pip install -i https://test.pypi.org/simple/ mypkg==0.1.0 into a fresh virtual Anaconda environment, which starts installing numpy-1.9.3 that’s clearly below 1.20, and yields File "c:python38libsite-packagessetuptoolsmsvc.py", line 328, in msvc14_gen_lib_options if LegacyVersion(np.__version__) < …

Total answers: 1

How to reference a requirements.txt from a pyproject.toml?

How to reference a requirements.txt in the pyproject.toml of a setuptools project? Question: I’m trying to migrate a setuptools-based project from the legacy setup.py towards modern pyproject.toml configuration. At the same time I want to keep well established workflows based on pip-compile, i.e., a requirements.in that gets compiled to a requirements.txt (for end-user / non-library …

Total answers: 2

Migration from setup.py to pyproject.toml: how to specify package name?

Migration from setup.py to pyproject.toml: how to specify package name? Question: I’m currently trying to move our internal projects away from setup.py to pyproject.toml (PEP-518). I’d like to not use build backend specific configuration if possible, even though I do specify the backend in the [build-system] section by require‘ing it. The pyproject.toml files are more …

Total answers: 2

Questions on pyproject.toml vs setup.py

Questions on pyproject.toml vs setup.py Question: Reading up on pyproject.toml, python -m pip install, poetry, flit, etc – I have several questions regarding replacing setup.py with pyproject.toml. My biggest question was – how does a toml file replace a setup.py. Meaning, a toml file can’t do everything a py file can. Reading into it, poetry …

Total answers: 2

Windows 10, Datatable install issue 'Preparing metadata (pyproject.toml) did not run successfully.'

Windows 10, Datatable install issue 'Preparing metadata (pyproject.toml) did not run successfully.' Question: I have Python 3.10.2, pip 22.0.3, and pyqt5.15.2 . I run into this error when I try to install datatable: pip install datatable Collecting datatable Using cached datatable-1.0.0.tar.gz (1.1 MB) Getting requirements to build wheel … done Preparing metadata (pyproject.toml) … error …

Total answers: 2

How to install a package using pip in editable mode with pyproject.toml?

How to install a package using pip in editable mode with pyproject.toml? Question: When a project is specified only via pyproject.toml (i.e. no setup.{py,cfg} files), how can it be installed in editable mode via pip (i.e. python -m pip install -e .)? I tried both setuptools and poetry for the build system, but neither worked: …

Total answers: 4

Specifying command line scripts in pyproject.toml

Specifying command line scripts in pyproject.toml Question: I’m trying to add a pyproject.toml to a project that’s been using setup.py in order to enable support by pipx. I’d like to specify the command line scripts the project includes in pyproject.toml, but all the guides I can find give instructions for use with poetry, which I …

Total answers: 2

Ignoring Django Migrations in pyproject.toml file for Black formatter

Ignoring Django Migrations in pyproject.toml file for Black formatter Question: I just got Black and Pre-Commit set up for my Django repository. I used the default config for Black from the tutorial I followed and it’s been working great, but I am having trouble excluding my migrations files from it. Here is the default configuration …

Total answers: 5

How to build a source distribution without using setup.py file?

How to build a source distribution without using setup.py file? Question: With the following package structure . ├── my_package │ └── __init__.py ├── setup.cfg └── setup.py Contents of setup.py from setuptools import setup setup() Contents of setup.cfg [metadata] name = my_package version = 0.1 [options] packages = find: I can build wheel or a source …

Total answers: 3