python-packaging Questions

3

I create a new env with python 3.10.9 using conda. I have poetry installed using pip, after I add several packages, the poetry add pkg command didn't work with error message: HTTPResponse.__init__(...
Steak asked 20/5, 2023 at 13:32

3

I recently started experimenting with Poetry for package and dependency management, and I am still getting used to the differences between it and my experience with setuptools. Specifically, I woul...
Microelectronics asked 6/6, 2020 at 15:34

5

Solved

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 tut...
Curtsy asked 20/11, 2022 at 12:18

2

Solved

I'm fairly new to python packaging and I'm trying to create a command line tool so that I can send to client to interact with my service in AWS. My goal is to have a command line tool to upload fil...
Foresee asked 15/6, 2023 at 19:48

7

Solved

I've been making Python scripts for simple tasks at work and never really bothered packaging them for others to use. Now I have been assigned to make a Python wrapper for a REST API. I have absolut...
Jorrie asked 1/4, 2013 at 15:48

4

Problem I have a folder structure like this: - modules - root - abc hello.py __init__.py - xyz hi.py __init__.py blah.py __init__.py foo.py bar.py __init_.py Here is the same thing ...
Strand asked 20/2, 2018 at 6:44

1

I am using the setuptools build back-end with pyproject.toml configuration to create Python packages. My package version is dynamic, for now I am setting a __version__ attribute in __init__.py and ...
Wakefield asked 22/4, 2023 at 17:45

1

Solved

When using src layout rather than flat layout in a Python project, is anything other than the project module expected to live in the src folder? My understanding is that if I added mypkg2 under src...
Otalgia asked 18/4, 2023 at 17:0

2

We are using pip -e . to install our package in editable/development mode, instead of using python setup.py develop. (We have to do so, because we pull packages from the public PyPi server and a pr...
Vigorous asked 9/1, 2015 at 13:52

1

Solved

Say you have a Python program that you can successfully package using only pyproject.toml. What are the downsides? Why use setup.py or setup.cfg in this case?

1

I am using the latest version of pip, 23.01. I have a pyproject.toml file with dependencies and optional dependency groups (aka "extras"). To avoid redundancies and make managing optional...
Studbook asked 17/2, 2023 at 23:52

1

I have a setup.py like this: #!/usr/bin/env python from setuptools import setup, find_packages setup( name="myproject", package_dir={"": "src"}, packages=find_pac...
Olivaolivaceous asked 11/2, 2023 at 11:17

2

Solved

Context So, I'm trying to create a new Python package following this tutorial: https://packaging.python.org/en/latest/tutorials/packaging-projects/ As the tutorial says, in my pyproject.toml ...

1

Solved

I'm in the process of converting my projects to use flit as their build backend using pyroject.toml as defined in PEP517. I still have some projects that will continue to use setuptools as their bu...
Moramorabito asked 27/6, 2020 at 1:34

1

Solved

I am trying to update my Python CI environment and am working on package management right now. I have several reasons that I do not want to use Poetry; however, one nice feature of poetry is the fa...
Bateman asked 1/2, 2023 at 16:54

1

I'm trying to figure out what would be the easiest way to create an Installer using Wix Toolset. I'm building my app in Python and then creating an installer using PyInstaller as a One Folder (not ...
Absorber asked 22/3, 2021 at 20:26

1

Solved

I am using project.toml file to package my module, I want to extract the version from git tag using setuptools_scm module. When I run python setup.p y --version command it gives this output 0.0.1.p...
Postiche asked 12/1, 2023 at 3:28

1

I have a Python project with a pyproject.toml similar to the one below. I use python build to generate an package I use to install in production environments. For development environments, I use pi...
Burly asked 8/1, 2023 at 16:56

0

I have to download some binary files from a location during the installation to have all necessary data files in place for my program. What is the correct place to do this in pyproject.toml, the se...
Limpet asked 9/1, 2023 at 15:0

2

Solved

I'm trying to distribute a shell script along with a Python package. Ideally, the shell script is installed when I run pip install my_package. I read from this SO that, my expected behavior is exac...
Distort asked 30/8, 2022 at 13:31

2

Solved

What is the correct format for supplying a name to a Python package in a pyproject.toml? Here's the pyproject.toml file: [project] name = "foobar" version = "0.0.1" [build-syst...
Biysk asked 17/3, 2022 at 18:29

1

I didn't quite understand how to use setuptools-scm. From what I understand, this tool should derive a version number according to the SCM (git in my case) history. It basically uses the distance f...
Precentor asked 5/9, 2022 at 7:3

3

Solved

How do I add links under the Project Links section of my PyPI project?
Transmontane asked 11/4, 2020 at 11:48

4

Solved

I am making a package, and the modules within this package have code inside if __name__=='__main__': blocks for testing purposes. But my attempts to use relative imports in these modules causes err...

1

The GitLab instructions for packaging a Python project for the package registry instruct users to create a pyproject.toml file with the following contents: [build-system] requires = ["setuptoo...
Pagepageant asked 2/11, 2022 at 3:33

© 2022 - 2025 — McMap. All rights reserved.