Questions tagged [setuptools]
setuptools is a set of enhancements to Python's distutils which simplify building, distribution and installation of Python packages.
3,459
questions
0
votes
0
answers
10
views
Why CFLAGS not working with pip in Windows
This is about Windows!
I have a modern LLVM setup to work with distutils via compiler=mingw32 option in config file.
But newer clang versions are more strict with warnings, so I want to pass -Wno-...
0
votes
1
answer
22
views
How to clean build files in python without setup.py?
By invoking directly setup.py, it is possible to remove the build directory via python setup.py clean --all (not to mention other options)
As invocation to setup.py is now discouraged, is there any ...
1
vote
1
answer
22
views
Using SETUPTOOLS_SCM_PRETEND_VERSION for package version inside Docker with .git directory in dockerignore
I'm using setuptools scm to dynamically provide version numbers for a Python package, and have these lines in the pyproject.toml:
...
dynamic = ["dependencies", "version", "...
0
votes
0
answers
32
views
Setuptools & Python Packaging
There is a similar question but it does not fit 100% to mine.
I have this project layout:
src/
└── mypackage/
├── __init__.py (empty)
├── a.py
└── mysubpackage1/
├── ...
0
votes
0
answers
7
views
Windows 10 - pip says 'ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)'
We work in a closed network with limited access to internet, so no way of updating packages as I like. I recently made some changes to a package in use here and when I tried to install it with pip ...
0
votes
0
answers
38
views
Include .exe file inside pypi package
I want to include an executable file inside my python package.
I'm using pyproject.toml with setuptools to build.
I tried to add a MANIFEST.in file with these lines:
include README.md
include LICENSE
...
1
vote
2
answers
23
views
OpenEmbedded (Yocto) recipe for Python validators library
I want to include the Python library validators in my OpenEmbedded build. I am working with the Kirkstone release and the latest version of validators is 0.22.0. There is no recpipe, so I added it ...
0
votes
0
answers
9
views
Warning when using dist.Distribution().fetch_build_eggs(['Cython', 'numpy'])
I am using Cython and numpy in setup.py. However, it creates a problem with setup.py trying to use cythonize and numpy before it is actually installed. I found multiple answers to how to avoid it ->...
2
votes
0
answers
66
views
Installing local dependency with pip install
I am using the Setuptools build backend for a pyproject.toml-based project.
I have this project structure:
- project_root
- dependency_lib
- pyproject.toml
- * other files *
- ...
0
votes
1
answer
62
views
I cannot import a Python package despite it being on the right path
I wrote a Python package and uploaded it to PyPI (note: I have been working on Python 3.11.3 and set Python >=3.11 as a requirement to make sure the package is compatible).
Subsequently, I ...
0
votes
0
answers
20
views
Error during package installation from testpypi [duplicate]
I wrote a library package and uploaded it to pypi.On trying to install it using the pip command, I am getting an error.
The setup.py file has install_requires with the below:
install_requires=['...
0
votes
0
answers
16
views
Depending on PyAudio
Im trying to build a python package using setup.cfg, pyproject.toml the build module and a setuptools build backend (this is ridiculous). This Package depends on PyAudio which can not be install via ...
0
votes
0
answers
10
views
Exclude global patterns in setuptools.packages.find is not working
I have a package Foo where I want to exclude both the test files located in folders tests and the file(s) conftest.py.
My pyproject.toml configuration is:
[tool.setuptools.packages.find]
exclude = ['...
1
vote
0
answers
52
views
Pip install pygwalker failed due to setuptools version not found
pygwalker failure despite setuptools already installed
pip install pygwalker --use-pep517 --proxy=\<proxy\>:\<port\>
Output:
Collecting pygwalker
Using cached pygwalker-0.3.15-py3-none-...
1
vote
0
answers
56
views
pyproject.toml setuptools: How can I specify optional scripts (and modules)?
I have a python project with some modules, scripts and optional dependencies:
[project.optional-dependencies]
extra = [ "tqdm", "antspyx>=0.4.2", "scikit-image", "...
1
vote
0
answers
41
views
`setuptools_scm` includes a committed `.gitignore` to an `sdist` package [duplicate]
I have a flat-layout project like this:
├── project_name
│ └── ...
├── .gitignore
├── pyproject.toml
└── ...
I follow the setuptools docs to compose the pyproject.toml like this:
[build-system]
...
0
votes
1
answer
28
views
setup.py files equivalence of data-files attribute in pyproject.toml
Does anyone know the equivalent syntax of data-files in pyptoject.toml. I know that it's deprecated but I wanted to do something quick and dirty without making too many changes to an existing repo.
I ...
0
votes
0
answers
30
views
What is the best practice for releasing python packages with a base version and a full version?
I'm developing a Python package where I wish to have a 'base' version and a 'full' version. The base version will have the bare bones stuff whereas the 'full' version will have extra functionality. My ...
0
votes
0
answers
33
views
Can a Python setuptools entry script have the same name as the package it is in?
I'm trying to fix some broken python packages, distributed through bioconda or conda-forge. Many of them have a script that has been used as an entry point with the same name as the package itself, ...
0
votes
0
answers
36
views
How do you tell setuptools to build an extension for --debug when using pyproject.toml / PEP 518
I have created a Python project with a C++ extension using pyproject.toml (PEP 518, PEP 517, PEP 621, PEP 660, etc.). I'm sure I could be doing some things better, but generally speaking it's working ...
0
votes
0
answers
38
views
Install a Python package and debug it
I have the following use case:
I want to write some code that uses a package from GitHub, while debugging that package. I cloned that package next to the directory with my code, so the directory ...
1
vote
0
answers
60
views
Import locally installed python package from elsewhere
Yet another stupid question about Python packaging. I've searched stackoverflow but am unable to find an answer, or, the answers I find do not work.
The task: Load a package, locally installed (with ...
0
votes
0
answers
23
views
Imports for a class failing when it is run by a test, python, pytest
This is my package structure
├── src/
│ ├── __init__.py
│ ├── class_1.py
│ ├── used_by_class_1.py
└── tests/
├── __init__.py
└── test_class_1
I have imported my package into ...
0
votes
0
answers
21
views
Python "setuptools" build with C++ files in higher directory
I am struggling to compile an extension module.
My C++ files are in a higher directory than my "setup.py"/etc. files. This is because the Python extension is a binding of a C++ library, and ...
1
vote
0
answers
38
views
How to build a wheel with .py and .pyd at the root
When building a Python wheel, the .pyd files contained in the project are not included.
Here's a snapshot of the project directory:
my_project
+-- pyproject.toml
+-- MANIFEST.in
+-- src/
+-- ...
0
votes
1
answer
31
views
two copies of source code being checked by flake8 in CI/CD pipeline
When I run flake8 ., it runs on two copies of my source code:
./build/lib/smartx/smartpressing/frlo/silver/tagenriched.py:14:13: E225 missing whitespace around operator
./smartx/smartpressing/frlo/...
0
votes
0
answers
20
views
Python module is installed using repository folder name, not package name
I have a git repository - let's call it called foo-bar - but for whatever reason the package is called foo_bar (i.e. in src/foo_bar and defined in pyproject.toml).
[project]
name = "foo_bar"
...
1
vote
1
answer
71
views
Airflow: Package installation of rpy2 to execute RScripts in Airflow
Requirement: To be able to install the rpy2 library, as the code to be orchestrated with airflow uses it extensively
Current Dockerfile
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-...
0
votes
1
answer
63
views
I am installing pyautogui package and it is giving some Installing build dependencies ... error
I have successfully installed every other package, but nothing working for the pyautogui package. My Python version is 3.11, pip version is 23.3.1, setuptools version is 68.2.2.
I tried using the ...
0
votes
0
answers
23
views
Building wheel with setup.py and skbuild in linux fails due to permission (Works in Windows)
I'm trying to build a wheel for my package in Linux and get an permission error at a late stage in the build process. This is the error message I get in Linux:
...
...
copying _skbuild/linux-x86_64-3....
1
vote
1
answer
54
views
What's the difference between 'pip3 install -e .' and 'python3 setup.py develop'
When installing a Python package locally in editable mode, both 'pip3 install -e .', and 'python3 setup.py develop', will both install the package locally in editable mode. I know that 'pip3 install -...
0
votes
1
answer
63
views
Python package not being found after install
I have a project directory structure like this:
root\
.git\
server\
setup.py
company\
__init__.py
zed\
__init__.py
...
0
votes
0
answers
106
views
How can I modify a customized build class derived from build_py so that it builds in a temporary directory?
I have a setup.py file with a customized build class derived from build_py, which is imported from either distutils (for older setups) or setuptools:
try:
warnings.filterwarnings('ignore',
...
0
votes
0
answers
44
views
correct import path for setuptools
I'm installing a project with setuptools but couldn't get the import path correct.
The project is simple:
.
├── setup.py
└── src
├── europe
│ ├── germany.py
│ └── __init__.py
├── ...
0
votes
1
answer
26
views
Strip scripts from pybuild
I need to build a debian package from a python package.
The python package is not under my control so i can not easily change the setup.py file.
It is using setuptools and has a very standard setup.py ...
1
vote
0
answers
33
views
Manually Add Source Files to Conda-Build Package
I am building a conda package for a pure python application. The application has a setup.py file that the build.sh file uses to locate the packages that should go into the build. This works well for ...
0
votes
0
answers
34
views
pyproject.toml always includes a file from test (excluded) module
I am trying to package my python project with following sturcture.
testpkg/
|> lib/
|> __init__.py
|> mod1/
|> __init__.py
|> scripts/
|> __init__.py
|> main.py #has a ...
0
votes
0
answers
18
views
Issue of installing google-colab in jupyter env
I'm trying to install google-colab in my jupyter-lab.
pip install google-colab
but, error retuned like below.
note: This error originates from a subprocess, and is likely not a problem with pip.
...
0
votes
0
answers
81
views
Suppressing Python warnings with PYTHONWARNINGS
I'd like to suppress some warnings about python setup.py install being deprecated [1], and have managed to do this on Debian Buster and Bookworm with the PYTHONWARNINGS facility, in my Makefile
...
0
votes
1
answer
50
views
How can I make my Python library with TensorFlow dependencies adaptable for both CPU and GPU versions using Setuptools?
I am building a python library that would be deployed as a python package on PyPI.
The tool I'm using as build system is Setuptools. The library is supposed to work with TensorFlow as a dependency so ...
7
votes
1
answer
5k
views
Why did I got an error ModuleNotFoundError: No module named 'distutils'?
I managed to install scikit-fuzzy but when I want to import it I got an error
ModuleNotFoundError: No module named 'distutils'"
I'm not really new to python but it's been a while since I last ...
0
votes
0
answers
28
views
can I control setuptools imports more finely?
I'm having some difficulty controlling precisely which modules of my package are being imported by setuptools. It seems to be importing "greedily" and I don't know why.
Let's say I have the ...
0
votes
0
answers
61
views
cannot install anyjson even have downgraded setuptools==57.5.0
I cannot install anyjson even have downgraded setuptools==57.5.0,
Here is what I have run.
% pip install setuptools==57.5.0
% pip install anyjson==0.3.3
Collecting anyjson==0.3.3
Using cached ...
0
votes
0
answers
29
views
Unable to build package Python
I am unable to build my Python package. I have barely changed any code and it used to work months ago. When running python setup.py sdist it doesn't create a new .tar file for the package distribution....
0
votes
0
answers
41
views
build_ext runs twice when doing "pip install -e"
I am compiling OpenAI Triton from source. When running "pip install -e python" in the root dir, which uses this setup.py https://github.com/openai/triton/blob/main/python/setup.py, I see:
(...
0
votes
1
answer
100
views
The problem with setuptools, anaconda prompt
I'm developing a project using this video. The command in 11:27 returns some errors.
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [68 lines of output]
...
0
votes
0
answers
53
views
Python Pip Package with React Frontend
I have a project where a Flask app is being installed as a Pip Package and can be ran using a command. The project is using a pyproject.toml and a MANIFEST.IN to specify how the project should be ...
2
votes
0
answers
124
views
How to include a whl file in a Python package and install it as a dependency (in pyproject.toml)
I am creating a Python package and in my requirements I have a certain (hardware-related) Python package that is not available in PyPI or Git or anywhere else on the web. I would like to include this ...
0
votes
0
answers
35
views
'tools:replace="android:exported"' to <receiver> element at AndroidManifest.xml to override
Running Gradle task 'assembleDebug'...
C:\Users\kumar\Desktop\Emart_V2.1_Source_Code\apps\eMart_Customer\android\app\src\debug\AndroidManifest.xml:133:13-37 Error:
Attribute receiver#com.razorpay....
0
votes
0
answers
76
views
error installing secrets because of missing openSSL bindings in python Python 3.11.5
I have been trying to install secrets using pip to make a basic password generator and manager. I have already installed setuptools(both latest and an older version), cryptography and pyopenssl, but I ...