pyproject.toml

pyproject.toml in an isolated environment

pyproject.toml in an isolated environment Question: I am trying to use pyproject.toml (and specifically setuptools_scm) in an isolated environment. My minimal pyproject.toml is: [build-system] requires = ["setuptools-scm"] [tool.setuptools_scm] write_to = "mypackage/version.py" However, when trying to install my package in an isolated environment, I get: $ pip3 install –no-index -e . Obtaining file:///home/…/myproject Installing build dependencies …

Total answers: 1

What's difference between [tool.poetry] and [project] in pyproject.toml?

What's difference between [tool.poetry] and [project] in pyproject.toml? Question: Context So, I’m trying to create a new python package following this guideline: https://packaging.python.org/en/latest/tutorials/packaging-projects/ As a guideline says – in my pyproject.toml I should have this structure: [project] name = "example_package_YOUR_USERNAME_HERE" version = "0.0.1" authors = [ { name="Example Author", email="[email protected]" }, ] description = "A …

Total answers: 2

Installing test files with pyproject.toml and setuptools

Installing test files with pyproject.toml and setuptools Question: I’m migrating an old python project to the new pyproject.toml based system and am having trouble with getting files that are required by tests to install. Inside the pyproject.toml I have: [tool.setuptools] package-data = {"my_pkg_name" = ["tests/*.sdf", "tests/*.urdf", "tests/*.xml", "tests/meshes/*.obj"]} [build-system] requires = ["setuptools>=43.0.0", "wheel"] build-backend = …

Total answers: 1

Is there something like python setup.py –version for pyproject.toml?

Is there something like python setup.py –version for pyproject.toml? Question: With a simple setup.py file: from setuptools import setup setup( name=’foo’, version=’1.2.3′, ) I can do $> python setup.py –version 1.2.3 without installing the package. Is there similar functionality for the equivalent pyproject.toml file: [project] name = "foo" version = "1.2.3" Asked By: thebjorn || …

Total answers: 1

Poetry add same library for different Python versions

Poetry add same library for different Python versions Question: I know how to add python constraint for a single library flake8 = { version = "^6.0.0", python = ">=3.8.1" } But what if I want to have same library, but different version for a different Python version? In case I add it with another constraint …

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

problem to install pyproject.toml dependencies with pip

problem to install pyproject.toml dependencies with pip Question: I have an old project created with poetry. The pyproject.toml create by poetry is the following: [tool.poetry] name = "Dota2Learning" version = "0.3.0" description = "Statistics and Machine Learning for your Dota2 Games." license = "MIT" readme = "README.md" homepage = "Coming soon…" repository = "https://github.com/drigols/dota2learning/" documentation …

Total answers: 1

Single source of truth for Python project version in presence of pyproject.toml

Single source of truth for Python project version in presence of pyproject.toml Question: The pyproject.toml specification affords the ability to specify the project version, e.g. [project] name = "foo" version = "0.0.1" However, it is also a common Python idiom to put __version__ = "0.0.1" in foo/__init__.py so that users can query it. Is there …

Total answers: 1

How to replace setup.py with a pyproject.toml for a native C build dependency?

How to replace setup.py with a pyproject.toml for a native C build dependency? Question: I came across this little project for creating a C-compiled version of the Black-Scholes function to be used in python. Although the example code seem to have been published in July this year, it seem that the use setup.py type of …

Total answers: 1

Specify dependency version >= for git repository in pyproject.toml

Specify dependency version >= for git repository in pyproject.toml Question: I have a python project with all dependencies and versions managed by pyproject.toml file. One of these dependencies is a git reference: [project] name = ‘my_package’ version = ‘1.0.0’ dependencies = [ ‘my_dependency @ git+https://github.com/some_user/some_repo.git’ ] In order to improve version management after some time …

Total answers: 1