Questions tagged [setuptools-scm]
29 questions
16
votes
1 answer
Is there a need for bumpversion (or bump2version) when setuptools_scm is available?
TLDR;
The question is as the title says.
To bump or not to bump?
I started using bump2version and then discovered setuptools_scm (fairly new to developing full-fledged python programs) and now I am…

Ahmed Masud
- 21,655
- 3
- 33
- 58
7
votes
2 answers
setuptools-scm: current version instead of next version
I want to use setuptools-scm to control my package version. My setup.py:
setuptools.setup(
...
use_scm_version={'write_to': 'my-package/version.py'},
...
)
Currently I have v0.2 tag in my repo. I created new branch and added some commits. When…

approximatenumber
- 467
- 1
- 7
- 22
7
votes
1 answer
pytest-xdist: LookupError: setuptools-scm was unable to detect version
When installing pytest-xdist, I'm getting this error:
Collecting pytest-xdist>=1.15.0
Downloading https://company.com/pypi/packages/dc/b2/a59db3ef996b93c3ef35dbbc33557a71ef67a6839d94a52c88eeb1086002/pytest-xdist-1.15.0.tar.gz (87kB)
100%…

yndolok
- 5,197
- 2
- 42
- 46
6
votes
3 answers
how to use release branch to increment version using setuptools_scm?
I am looking at https://github.com/pypa/setuptools_scm
and I read this part https://github.com/pypa/setuptools_scm#version-number-construction
and i quote
Semantic versioning for projects with release branches. The same as guess-next-dev…

Kim Stacks
- 10,202
- 35
- 151
- 282
6
votes
0 answers
LookupError: setuptools-scm was unable to detect version (when using python setup.py install)
I’m trying to install setup.py (from the website: https://github.com/richpsharp/ipbes-analysis/tree/1.1.0/ipbes-ndr) in the python virtual environment 3.7 (named “py37”).
I typed in:
git clone https://github.com/richpsharp/ipbes-analysis.git
cd…

Yuqi
- 61
- 1
- 2
5
votes
1 answer
Python setuptools_scm get version from git tags
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.post1.dev0. How will I get only 0.0.1 value and omit…

sfgroups
- 18,151
- 28
- 132
- 204
5
votes
0 answers
setuptools-scm - get latest tagged version
If I have a project with:
$ cat pyproject.toml
[build-system]
requires = ["setuptools>=41.0", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"
$ git tag
0.1.0
$ git log
commit df40f0c6a207a0fa0fc03f8af01fbac939d6a5fa (HEAD ->…

ignoring_gravity
- 6,677
- 4
- 32
- 65
5
votes
1 answer
ReadTheDocs + Sphinx + setuptools_scm: how to?
I have a project where I manage the version through git tags.
Then, I use setuptools_scm to get this information in my setup.py and also generates a file (_version.py) that gets included when generating the wheel for pip.
This file is not tracked by…

norok2
- 25,683
- 4
- 73
- 99
4
votes
0 answers
Using setuptools with pyproject.toml ignores my bash script
I am using setuptools with pyproject.toml and setuptools_scm. I think setuptools is not working correctly, but functionality has changed so much and the documentation doesn't seem to explain the problem I'm having, so I'm kind of lost here. I want…

gnat79
- 57
- 4
4
votes
1 answer
setuptools_scm raises AssertionError: own dev numbers are unsupported
I have been using these two arguments in the setup.py for a while without any problems.
use_scm_version={"local_scheme": "no-local-version",},
setup_requires=["setuptools_scm"],
Although I have not made any changes on the setup.py, today I started…

anilbey
- 1,817
- 4
- 22
- 38
3
votes
0 answers
How to use PEP440 beta tags with setuptools_scm?
Is there a way to use PEP440-style beta release tags, such as v0.1.3b0 with setuptools_scm?
It currently gives an error invalid literal for int() with base 10: '3b0'.
This is from version 5.0.1 of setuptools_scm, which is the most recent as of…

Guy Middleton
- 314
- 1
- 9
3
votes
1 answer
setuptools_scm not working with `pip install .` in case of .git in parent folder
I have two or more Python packages in one versioned folder:
.
├── .git
├── api
│ ├── mf_hub_api
│ │ └── __init__.py
│ └── setup.py
├── pkg
│ ├── mf_hub
│ │ └── __init__.py
│ └── setup.py
└── README.rst
From both ./api and pkg python…

user3313834
- 7,327
- 12
- 56
- 99
3
votes
1 answer
Running application installed from bdist_wheel package using setuptools_scm fails with version lookup error
TL;DR
I am trying to create built-distribution package for a project that uses setuptools-scm. I generated the wheel package running python setup.py sdist bdist_wheel. I am able to install the .whl package using pip install .... But when I try to…

Zobayer Hasan
- 2,187
- 6
- 22
- 38
3
votes
3 answers
readthedocs and setuptools scm version wrong
I have a package I just updated to use setuptools_scm and found the version number is wrong in readthedocs.
http://sshuttle.readthedocs.org/en/v0.77/ shows:
Version: 0.78.dev0+ng083293e.d20160304
however as version 083293e has the 0.77 tag, the…

Penguin Brian
- 1,991
- 14
- 25
2
votes
1 answer
pyproject.toml in an isolated environment
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…

olebole
- 521
- 4
- 17