python-packaging

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

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

Installing my project from testpypi gives me an error

Installing my project from testpypi gives me an error Question: I am learning how to package python projects and publish them and I ran into a problem I have been trying to solve ,but failed. I have this small project and I am trying to upload it to Testpypi I managed to upload it there …

Total answers: 1

Remove warning in PIPENV

How to fix "RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection." warning when using pipenv? Question: Every time I run any pipenv command I’m getting this: C:Usersuser_nameAppDataLocalProgramsPythonPython311Libsite-packagespipenvvendorattr_make.py:876: RuntimeWarning: Running interpreter doesn’t sufficiently support code object introspection. Some features like bare super() or accessing class will not work with slotted classes. set_closure_cell(cell, cls) The command …

Total answers: 1

Python package with multiple "packages"?

Python package with multiple "packages"? Question: Assume I have a project which looks like uilities.py api_1.py api_2.py api_3.py foo.py bar.py baz.py The utilites and api calls does nothing by their own, but they form 90% of the contents of foo.py, bar.py and baz.py. The contents of foo.py, bar.py and baz.py. are very bare bones, including …

Total answers: 1

Cannot find a module imported by another module

Cannot find a module imported by another module Question: I have a file structure like this └── myproject ├── src ├── a.py ├── b.py module a contains a class that is imported in by module b like this: from src.a import some_class when I try to import b from another class: from myproject.src import b …

Total answers: 1