@ -1,42 +1,49 @@
%global rpmmacrodir %{_sysconfdir}/rpm
Name: python-rpm-macros
Name: python-rpm-macros
Version: 3
Version: 3
Release: 29%{?dist}
Release: 34%{?dist}
Summary: The unversioned Python RPM macros
Summary: The unversioned Python RPM macros
License: MIT
License: MIT
Source0: macros.python
Source0: macros.python
Source1: macros.python-srpm
Source1: macros.python-srpm
Source2: macros.python2
Source2: macros.python2
Source3: macros.python3
Source3: macros.python3
Source4: macros.pybytecompile
Source4: macros.pybytecompile
BuildArch: noarch
BuildArch: noarch
# The macro file has been moved from the python-devel package
Conflicts: python-devel < 2.7.5-78
# For %%python3_pkgversion used in %%python_provide
# For %%python3_pkgversion used in %%python_provide
Requires: python-srpm-macros
Requires: python-srpm-macros
Obsoletes: python-macros < 3
Provides: python-macros = %{version}-%{release}
%description
%description
This package contains the unversioned Python RPM macros, that most
This package contains the unversioned Python RPM macros, that most
implementations should rely on.
implementations should rely on.
You should not need to install this package manually as the various
You should not need to install this package manually as the various
python?-devel packages require it. So install a python-devel package instead.
python?-devel packages require it. So install a python-devel package instead.
%package -n python-srpm-macros
%package -n python-srpm-macros
Summary: RPM macros for building Python source packages
Summary: RPM macros for building Python source packages
%description -n python-srpm-macros
%description -n python-srpm-macros
RPM macros for building Python source packages.
RPM macros for building Python source packages.
#%package -n python2-rpm-macros
%package -n python2-rpm-macros
#Summary: RPM macros for building Python 2 packages
Summary: RPM macros for building Python 2 packages
# Would need to be different for each release - worth it?
# The macro file has been moved from the python-devel package
#Conflicts: python2-devel < 2.7.11-3
Conflicts: python-devel < 2.7.5-78
#%description -n python2-rpm-macros
#RPM macros for building Python 2 packages.
%description -n python2-rpm-macros
RPM macros for building Python 2 packages.
%package -n python3-rpm-macros
%package -n python3-rpm-macros
Summary: RPM macros for building Python 3 packages
Summary: RPM macros for building Python 3 packages
# Would need to be different for each release - worth it?
# Would need to be different for each release - worth it?
#Conflicts: python3-devel < 3.5.1-3
#Conflicts: python3-devel < 3.5.1-3
%description -n python3-rpm-macros
%description -n python3-rpm-macros
RPM macros for building Python 3 packages.
RPM macros for building Python 3 packages.
@ -46,36 +53,58 @@ RPM macros for building Python 3 packages.
%build
%build
%install
%install
mkdir -p %{buildroot}//usr/lib/rpm/macros.d/
mkdir -p %{buildroot}/%{_sysconfdir}/rpm
install -m 644 \
mkdir -p %{buildroot}/%{rpmmacrodir}
%{SOURCE1} \
install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
%{SOURCE3} \
%{buildroot}/%{_sysconfdir}/rpm/
%{SOURCE4} \
%{buildroot}/usr/lib/rpm/macros.d/
%files
%files
#/usr/lib/rpm/macros.d//macros.python
%{rpmmacrodir}/macros.python
/usr/lib/rpm/macros.d//macros.pybytecompile
%{rpmmacrodir}/macros.pybytecompile
%files -n python-srpm-macros
%files -n python-srpm-macros
/usr/lib/rpm/macros.d//macros.python-srpm
%{rpmmacrodir}/macros.python-srpm
#%files -n python2-rpm-macros
%files -n python2-rpm-macros
#/usr/lib/rpm/macros.d//macros.python2
%{rpmmacrodir}/macros.python2
%files -n python3-rpm-macros
%files -n python3-rpm-macros
/usr/lib/rpm/macros.d//macros.python3
%{rpmmacrodir}/macros.python3
%changelog
%changelog
* Wed Apr 18 2018 Miro Hrončok <mhroncok@redhat.com> - 3-29
* Tue Mar 17 2020 Miro Hrončok <mhroncok@redhat.com> - 3-34
- move macros.pybytecompile from python3-devel
- Make the %%py3_dist macro compatible with Python RPM generators
Resolves: rhbz#1812665
* Wed Mar 04 2020 Charalampos Stratakis <cstratak@redhat.com> - 3-33
- Fix the %%py_build macro to respect the global definition of %%__python
Resolves: rhbz#1757834
* Wed Apr 24 2019 Miro Hrončok <mhroncok@redhat.com> - 3-32
- %%python_provide: Obsolete and provide python36- from python3-
- %%python_provide: Provide python3- from python36-
Resolves: rhbz#1702719
* Mon Jan 14 2019 Lumír Balhar <lbalhar@redhat.com> - 3-31
- Converting specfile from F28 to RHEL7
- Move the macros to the standard RHEL7 macro location at /etc/rpm/,
instead of Fedora's location at /usr/lib/rpm/macros.d/
- Import the macros.python{,2} files from the python-devel package where they
resided until now, and Conflict with that old version of python-devel
- Import the macros.pybytecompile from Fedora rawhide / RHEL8
Resolves: rhbz#1660579
* Mon Jul 09 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 3-30
- Backport %%python3_platform macro.
* Mon Jun 18 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 3-29
- Add %%pypi_source macro.
* Fri Apr 06 2018 Tomas Orsava <torsava@redhat.com> - 3-28
* Fri Apr 06 2018 Tomas Orsava <torsava@redhat.com> - 3-28
- Fix the %%py_dist_name macro to not convert dots (".") into dashes, so that
- Fix the %%py_dist_name macro to not convert dots (".") into dashes, so that
submodules can be addressed as well
submodules can be addressed as well Resolves: rhbz#1564095
Resolves: rhbz#1564095
* Fri Mar 23 2018 Miro Hrončok <mhroncok@redhat.com> - 3-27
* Fri Mar 23 2018 Miro Hrončok <mhroncok@redhat.com> - 3-27
- make LDFLAGS propagated whenever CFLAGS are
- make LDFLAGS propagated whenever CFLAGS are