|
|
70a2d8 |
# define these macros in a way which will expand them to correct values even for non-scl-build, assuming 's/@scl@//'
|
|
|
70a2d8 |
%@scl@__python3
|
|
|
70a2d8 |
%@scl@__python %@scl@__python3
|
|
|
70a2d8 |
%@scl@python3_sitelib %(%{?scl:scl enable @vendorscl@ '}%{@scl@__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())"%{?scl:'})
|
|
|
70a2d8 |
%@scl@python3_sitearch %(%{?scl:scl enable @vendorscl@ '}%{@scl@__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"%{?scl:'})
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@python3_version %(%{?scl:scl enable @vendorscl@ '}%{@scl@__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])"%{?scl:'})
|
|
|
70a2d8 |
%@scl@python3_version_nodots %(%{?scl:scl enable @vendorscl@ "}%{@scl@__python3} -Ic \\"import sys; sys.stdout.write(sys.version[:3].replace('.',''))\\"%{?scl:'})
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@python3_platform %(%{?scl:scl enable @vendorscl@ '}%{@scl@__python3} -Ic "import sysconfig; print(sysconfig.get_platform())"%{?scl:'})
|
|
|
70a2d8 |
%@scl@py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py_setup setup.py
|
|
|
70a2d8 |
%@scl@py3_shbang_opts -s
|
|
|
70a2d8 |
|
|
|
70a2d8 |
# Use the slashes after expand so that the command starts on the same line as
|
|
|
70a2d8 |
# the macro
|
|
|
70a2d8 |
%@scl@py3_build() %{expand:\\\
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
70a2d8 |
%{@scl@__python3} %{@scl@py_setup} %{?py_setup_args} build --executable="%{@scl@__python3} %{@scl@py3_shbang_opts}" %{?*}\\\
|
|
|
70a2d8 |
%{?scl:'}
|
|
|
70a2d8 |
sleep 1
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_build_egg() %{expand:\\\
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
70a2d8 |
%{@scl@__python3} %{@scl@py_setup} %{?py_setup_args} bdist_egg %{?*}\\\
|
|
|
70a2d8 |
%{?scl:'}
|
|
|
70a2d8 |
sleep 1
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_build_wheel() %{expand:\\\
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
70a2d8 |
%{@scl@__python3} %{@scl@py_setup} %{?py_setup_args} bdist_wheel %{?*}\\\
|
|
|
70a2d8 |
%{?scl:'}
|
|
|
70a2d8 |
sleep 1
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_install() %{expand:\\\
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
|
|
70a2d8 |
%{@scl@__python3} %{@scl@py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\\\
|
|
|
70a2d8 |
%{?scl:'}
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_install_egg() %{expand:\\\
|
|
|
70a2d8 |
mkdir -p %{buildroot}%{python3_sitelib}
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="%{optflags}" %{@scl@__python3} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}\\\
|
|
|
70a2d8 |
%{?scl:'}
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_install_wheel() %{expand:\\\
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="%{optflags}" %{@scl@__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps\\\
|
|
|
70a2d8 |
%{?scl:'}
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_install_wheel_start() %{expand:\\\
|
|
|
70a2d8 |
%{?scl:scl enable @vendorscl@ '}\\\
|
|
|
70a2d8 |
CFLAGS="%{optflags}" %{python38__python3} -m pip install -I dist/}
|
|
|
70a2d8 |
|
|
|
70a2d8 |
%@scl@py3_install_wheel_end() %{expand:\\\
|
|
|
70a2d8 |
--root %{buildroot} --no-deps\\\
|
|
|
70a2d8 |
%{?scl:'}\\\
|
|
|
70a2d8 |
}
|