summaryrefslogtreecommitdiff
path: root/pyproject-rpm-macros.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-03-23 02:37:51 +0000
committerCoprDistGit <infra@openeuler.org>2023-03-23 02:37:51 +0000
commit9284fbc0394c3ded38abfc1bcefaf1b2e2f52f2f (patch)
treeb3500a4da94b2a113a16f652410bc749cde5c84a /pyproject-rpm-macros.spec
parent6d8e39fe5ab063ff2a4c2a918cb6ad5b5d4aec45 (diff)
automatic import of pyproject-rpm-macrosopeneuler20.03
Diffstat (limited to 'pyproject-rpm-macros.spec')
-rw-r--r--pyproject-rpm-macros.spec104
1 files changed, 21 insertions, 83 deletions
diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec
index be4a6fd..be91e35 100644
--- a/pyproject-rpm-macros.spec
+++ b/pyproject-rpm-macros.spec
@@ -4,42 +4,11 @@ License: MIT
%bcond_without tests
-# The idea is to follow the spirit of semver
-# Given version X.Y.Z:
-# Increment X and reset Y.Z when there is a *major* incompatibility
-# Increment Y and reset Z when new macros or features are added
-# Increment Z when this is a bugfix or a cosmetic change
-# Dropping support for EOL Fedoras is *not* considered a breaking change
-Version: 1.6.3
+Version: 1.4.0
Release: 1
-# Macro files
-Source001: macros.pyproject
-Source002: macros.aaa-pyproject-srpm
-
-# Implementation files
-Source101: pyproject_buildrequires.py
-Source102: pyproject_save_files.py
-Source103: pyproject_convert.py
-Source104: pyproject_preprocess_record.py
-Source105: pyproject_construct_toxenv.py
-Source106: pyproject_requirements_txt.py
-Source107: pyproject_wheel.py
-
-# Tests
-Source201: test_pyproject_buildrequires.py
-Source202: test_pyproject_save_files.py
-Source203: test_pyproject_requirements_txt.py
-Source204: compare_mandata.py
-
-# Test data
-Source301: pyproject_buildrequires_testcases.yaml
-Source302: pyproject_save_files_test_data.yaml
-Source303: test_RECORD
-
-# Metadata
-Source901: README.md
-Source902: LICENSE
+Source0: %{name}-%{version}.tar.gz
+
URL: https://src.fedoraproject.org/rpms/pyproject-rpm-macros
@@ -47,26 +16,21 @@ BuildArch: noarch
%if %{with tests}
BuildRequires: python3dist(pytest)
-BuildRequires: python3dist(pytest-xdist)
BuildRequires: python3dist(pyyaml)
BuildRequires: python3dist(packaging)
BuildRequires: python3dist(pip)
BuildRequires: python3dist(setuptools)
-BuildRequires: python3dist(tox-current-env) >= 0.0.6
BuildRequires: python3dist(wheel)
BuildRequires: (python3dist(toml) if python3-devel < 3.11)
%endif
-# We build on top of those:
BuildRequires: python-rpm-macros
BuildRequires: python-srpm-macros
BuildRequires: python3-rpm-macros
Requires: python-rpm-macros
Requires: python-srpm-macros
Requires: python3-rpm-macros
-Requires: (pyproject-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-srpm-macros)
-# We use the following tools outside of coreutils
Requires: /usr/bin/find
Requires: /usr/bin/sed
@@ -85,67 +49,41 @@ These macros replace %%py3_build and %%py3_install,
which only work with setup.py.
-%package -n pyproject-srpm-macros
-Summary: Minimal implementation of %%pyproject_buildrequires
-Requires: (pyproject-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-rpm-macros)
-
-%description -n pyproject-srpm-macros
-This package contains a minimal implementation of %%pyproject_buildrequires.
-When used in %%generate_buildrequires, it will generate BuildRequires
-for pyproject-rpm-macros. When both packages are installed, the full version
-takes precedence.
-
-
%prep
# Not strictly necessary but allows working on file names instead
# of source numbers in install section
-%setup -c -T
-cp -p %{sources} .
+%setup -q
%build
# nothing to do, sources are not buildable
%install
mkdir -p %{buildroot}%{_rpmmacrodir}
-mkdir -p %{buildroot}%{_rpmconfigdir}/redhat
+mkdir -p %{buildroot}%{_rpmconfigdir}/openEuler
install -pm 644 macros.pyproject %{buildroot}%{_rpmmacrodir}/
-install -pm 644 macros.aaa-pyproject-srpm %{buildroot}%{_rpmmacrodir}/
-install -pm 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/redhat/
-install -pm 644 pyproject_convert.py %{buildroot}%{_rpmconfigdir}/redhat/
-install -pm 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/redhat/
-install -pm 644 pyproject_preprocess_record.py %{buildroot}%{_rpmconfigdir}/redhat/
-install -pm 644 pyproject_construct_toxenv.py %{buildroot}%{_rpmconfigdir}/redhat/
-install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/redhat/
-install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/redhat/
-
-%if %{with tests}
-%check
-export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356
-%pytest -vv --doctest-modules -n auto
+install -pm 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/openEuler/
+install -pm 644 pyproject_convert.py %{buildroot}%{_rpmconfigdir}/openEuler/
+install -pm 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/openEuler/
+install -pm 644 pyproject_preprocess_record.py %{buildroot}%{_rpmconfigdir}/openEuler/
+install -pm 644 pyproject_construct_toxenv.py %{buildroot}%{_rpmconfigdir}/openEuler/
+install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/openEuler/
+install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/openEuler/
-# brp-compress is provided as an argument to get the right directory macro expansion
-%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress
-%endif
%files
%{_rpmmacrodir}/macros.pyproject
-%{_rpmconfigdir}/redhat/pyproject_buildrequires.py
-%{_rpmconfigdir}/redhat/pyproject_convert.py
-%{_rpmconfigdir}/redhat/pyproject_save_files.py
-%{_rpmconfigdir}/redhat/pyproject_preprocess_record.py
-%{_rpmconfigdir}/redhat/pyproject_construct_toxenv.py
-%{_rpmconfigdir}/redhat/pyproject_requirements_txt.py
-%{_rpmconfigdir}/redhat/pyproject_wheel.py
+%{_rpmconfigdir}/openEuler/pyproject_buildrequires.py
+%{_rpmconfigdir}/openEuler/pyproject_convert.py
+%{_rpmconfigdir}/openEuler/pyproject_save_files.py
+%{_rpmconfigdir}/openEuler/pyproject_preprocess_record.py
+%{_rpmconfigdir}/openEuler/pyproject_construct_toxenv.py
+%{_rpmconfigdir}/openEuler/pyproject_requirements_txt.py
+%{_rpmconfigdir}/openEuler/pyproject_wheel.py
%doc README.md
%license LICENSE
-%files -n pyproject-srpm-macros
-%{_rpmmacrodir}/macros.aaa-pyproject-srpm
-%license LICENSE
-
-
%changelog
-* Thu Mar 23 2023 lichaoran <pkwarcraft@hotmail.com> - 1.6.3-1
-- created package
+* Tue Jan 03 2023 tanyulong <tanyulong@kylinos.cn> - 1.4.0-1
+- init package for openEuler