Merge branch 'master' into f27-modularity

This commit is contained in:
Tomas Orsava 2017-11-28 16:18:04 +01:00
commit 39314ab14c
4 changed files with 16 additions and 58 deletions

View File

@ -1,38 +0,0 @@
%__platform_python /usr/libexec/platform-python
%platform_python_sitelib %(%{__platform_python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%platform_python_sitearch %(%{__platform_python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%platform_python_version %(%{__platform_python} -c "import sys; sys.stdout.write(sys.version[:3])")
%platform_python_version_nodots %(%{__platform_python} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
%platform_py_dir %{_builddir}/platform-python-%{name}-%{version}-%{release}
%platform_py_shbang_opts -s
# Use the slashes after expand so that the command starts on the same line as
# the macro
%platform_py_build() %{expand:\\\
CFLAGS="%{optflags}" %{__platform_python} %{py_setup} %{?py_setup_args} build --executable="%{__platform_python} %{platform_py_shbang_opts}" %{?*}
sleep 1
}
%platform_py_build_egg() %{expand:\\\
CFLAGS="%{optflags}" %{__platform_python} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
sleep 1
}
%platform_py_build_wheel() %{expand:\\\
CFLAGS="%{optflags}" %{__platform_python} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
sleep 1
}
%platform_py_install() %{expand:\\\
CFLAGS="%{optflags}" %{__platform_python} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
}
%platform_py_install_egg() %{expand:\\\
mkdir -p %{buildroot}%{platform_python_sitelib}
CFLAGS="%{optflags}" %{__platform_python} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{platform_python_version}.egg %{?*}
}
%platform_py_install_wheel() %{expand:\\\
CFLAGS="%{optflags}" %{__platform_python} -m pip install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
}

View File

@ -1,8 +1,8 @@
%__python2 /usr/bin/python2
%python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python2_version %(%{__python2} -c "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
%python2_version_nodots %(%{__python2} -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
%python2_sitelib %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python2_sitearch %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
%python2_version_nodots %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
%py2_shbang_opts -s

View File

@ -1,8 +1,8 @@
%__python3 /usr/bin/python3
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
%python3_version_nodots %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
%python3_version_nodots %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
%py3_shbang_opts -s

View File

@ -1,6 +1,6 @@
Name: python-rpm-macros
Version: 3
Release: 22%{?dist}
Release: 24%{?dist}
Summary: The unversioned Python RPM macros
License: MIT
@ -8,7 +8,6 @@ Source0: macros.python
Source1: macros.python-srpm
Source2: macros.python2
Source3: macros.python3
Source4: macros.platform-python
BuildArch: noarch
# For %%python3_pkgversion used in %%python_provide
@ -45,12 +44,6 @@ Summary: RPM macros for building Python 3 packages
%description -n python3-rpm-macros
RPM macros for building Python 3 packages.
%package -n platform-python-rpm-macros
Summary: RPM macros for building Platform-Python packages
%description -n platform-python-rpm-macros
RPM macros for building Platform-Python packages.
%prep
@ -58,7 +51,7 @@ RPM macros for building Platform-Python packages.
%install
mkdir -p %{buildroot}/%{rpmmacrodir}
install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
%{buildroot}/%{rpmmacrodir}/
@ -74,11 +67,14 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
%files -n python3-rpm-macros
%{rpmmacrodir}/macros.python3
%files -n platform-python-rpm-macros
%{rpmmacrodir}/macros.platform-python
%changelog
* Tue Nov 28 2017 Tomas Orsava <torsava@redhat.com> - 3-24
- Remove platform-python macros (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
* Thu Oct 26 2017 Ville Skyttä <ville.skytta@iki.fi> - 3-23
- Use -Es/-I to invoke macro scriptlets (#1506355)
* Wed Aug 02 2017 Tomas Orsava <torsava@redhat.com> - 3-22
- Add platform-python macros (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)