Skip to content

Commit

Permalink
Stop depending on setuptools_scm_git_archive
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <[email protected]>
  • Loading branch information
nforro committed Sep 26, 2023
1 parent b6666b1 commit 6f5688c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true)$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Needed for setuptools-scm-git-archive
# Needed for setuptools-scm
.git_archival.txt export-subst
1 change: 0 additions & 1 deletion fedora/python-ogr.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(setuptools-scm)
BuildRequires: python3dist(setuptools-scm-git-archive)

%description
One Git library to Rule!
Expand Down
6 changes: 6 additions & 0 deletions files/tasks/install-ogr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
- name: Print the current working directory
command: pwd
- name: Require any version of setuptools_scm
lineinfile:
path: "{{ project_dir }}/setup.cfg"
regexp: '^(\s*)setuptools_scm.*'
line: '\1setuptools_scm'
backrefs: true
- name: Install ogr from {{ project_dir }}
pip:
name: "{{ project_dir }}"
Expand Down
1 change: 0 additions & 1 deletion files/tasks/rpm-test-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- python3-setuptools
- git-core
- python3-setuptools_scm
- python3-setuptools_scm_git_archive
- python3-wheel # for bdist_wheel
- python3-pytest
- python3-tox
Expand Down
1 change: 0 additions & 1 deletion recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
- python3-setuptools
- git-core
- python3-setuptools_scm
- python3-setuptools_scm_git_archive
- python3-wheel # for bdist_wheel
- python3-pytest
- python3-tox
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ install_requires =
python_requires = >=3.9
include_package_data = True
setup_requires =
setuptools_scm
setuptools_scm_git_archive
setuptools_scm >= 7

[options.extras_require]
testing =
Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

from setuptools import setup

setup(use_scm_version=True)
# we can't use pre-release-based version scheme because it generates versions
# that are sorted higher than the last stable release by RPM
# for example:
# - pre-release (guess-next-dev):
# 0.20.1.dev1+g0abcdef.d20230921 > 0.20.1
# - post-release (no-guess-dev):
# 0.20.0.post1.dev1+g0abcdef < 0.20.1
setup(use_scm_version={"version_scheme": "no-guess-dev"})

0 comments on commit 6f5688c

Please sign in to comment.