python-packaging

Poetry add dependency that uses cython

Poetry add dependency that uses cython Question: I have a project which needs to depend on the latest commit of pysam, because I’m working in python 3.11. This means building the package from source, so I do the following: poetry add git+https://github.com/pysam-developers/pysam However, I get an error which I think boils down to poetry not …

Total answers: 1

How to force a platform wheel using build and pyproject.toml?

How to force a platform wheel using build and pyproject.toml? Question: I am trying to force a Python3 non-universal wheel I’m building to be a platform wheel, despite not having any native build steps that happen during the distribution-packaging process. The wheel will include an OS-specific shared library, but that library is built and copied …

Total answers: 1

Question about Packaging in Python with pip

Question about Packaging in Python with pip Question: I saw this nice explanation video (link) of packaging using pip and I got two questions: The first one is: I write a code which I want to share with my colleagues, but I do not aim to share it via pypi. Thus, I want to share …

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

A build-system independent way to get the version from a package source directory

A build-system independent way to get the version from a package source directory Question: There are many different ways that Python packages manage their version data. Is there a build-system independent way to extract the version from a package source directory? I’m aware of the PEP 517 compatible Python package builder build which does this …

Total answers: 1

Get app version from pyproject.toml inside python code

Get app version from pyproject.toml inside python code Question: I am not very familiar with python, I only done automation with so I am a new with packages and everything. I am creating an API with Flask, Gunicorn and Poetry. I noticed that there is a version number inside the pyproject.toml and I would like …

Total answers: 2

Create different python packages from same repository

Create different python packages from same repository Question: I’m building a Python package from a source code repository I have, using a setup.py script with setuptools.setup(…). In this function call I include all the Python libraries needed for the project to be installed using the install_requires argument. However, I noticed some users do not use …

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

Is requirements.txt still needed when using pyproject.toml?

Is requirements.txt still needed when using pyproject.toml? Question: Since mid 2022 it is now possible to get rid of setup.py, setup.cfg in favor of pyproject.toml. Editable installs work with recent versions of setuptools and pip and even the official packaging tutorial switched away from setup.py to pyproject.toml. However, documentation regarding requirements.txt seems to be have …

Total answers: 3