Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of setuptools_scm_git_archive #290

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 1 addition & 3 deletions epel8/python-specfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Source0: %{pypi_source specfile}
BuildArch: noarch

BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: %{py3_dist setuptools setuptools-scm setuptools-scm-git-archive}
BuildRequires: %{py3_dist setuptools setuptools-scm}
BuildRequires: %{py3_dist importlib-metadata dataclasses rpm typing-extensions}
BuildRequires: %{py3_dist flexmock pytest}
BuildRequires: git-core
Expand All @@ -37,8 +37,6 @@ Summary: %{summary}

%prep
%autosetup -p1 -n specfile-%{version}
# Use packaged RPM python bindings downstream
sed -i 's/rpm-py-installer/rpm/' setup.cfg
# Remove bundled egg-info
rm -rf specfile.egg-info

Expand Down
9 changes: 4 additions & 5 deletions fedora/python-specfile.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
%if 0%{?rhel} == 9
# RHEL 9 is missing python-flexmock
%bcond_with tests
%else
%bcond_without tests
%endif


%global desc %{expand:
Expand Down Expand Up @@ -46,6 +41,10 @@ Summary: %{summary}
%prep
%autosetup -p1 -n specfile-%{version}

# since we are building from PyPI source, we don't need git-archive
# support in setuptools_scm
sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml


%generate_buildrequires
%pyproject_buildrequires %{?with_tests: -x testing}
Expand Down
5 changes: 1 addition & 4 deletions files/tasks/rpm-test-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
name:
- python3-pytest
- python3-pytest-cov
- python3-flexmock
become: true
- name: Pip install test dependencies
ansible.builtin.pip:
name:
- flexmock # RHBZ#2120251
8 changes: 0 additions & 8 deletions plans/full.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,3 @@ summary:
Unit & integration tests
discover+:
filter: tier:1
adjust:
- when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9"
because: "flexmock is not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251"
prepare:
- how: install
package: python3-pip
- how: shell
script: pip3 install flexmock
4 changes: 2 additions & 2 deletions plans/packit-integration.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ adjust:
directory: noarch/

- when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9"
because: "flexmock and deepdiff are not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251"
because: "deepdiff is not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251"
prepare+:
- how: install
package: python3-pip
- how: shell
script: pip3 install flexmock deepdiff
script: pip3 install deepdiff

- when: "distro == rhel-8 or distro == centos-8 or distro == centos-stream-8"
because: "packit doesn't support EL 8"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
"setuptools>=45",
"setuptools_scm[toml]",
"setuptools_scm_git_archive",
# setuptools_scm added git-archive support in version 7
"setuptools_scm[toml]>=7",
nforro marked this conversation as resolved.
Show resolved Hide resolved
]
build-backend = "setuptools.build_meta"

Expand Down
5 changes: 0 additions & 5 deletions tests/full.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ require:
- python3-pytest
- python3-pytest-cov
- python3-specfile
adjust:
- when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9"
because: "flexmock is not in EPEL 9: https://bugzilla.redhat.com/show_bug.cgi?id=2120251"
require-:
- python3-flexmock
tag:
- basic
tier: 1
Expand Down