Blame SOURCES/macros.python3

2599dd
%__python3 /usr/libexec/platform-python
2599dd
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
2599dd
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
2599dd
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
2599dd
%python3_version_nodots %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
2599dd
%python3_platform %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_platform())")
2599dd
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
2599dd
2599dd
%py3_shbang_opts -s
2599dd
2599dd
# Use the slashes after expand so that the command starts on the same line as
2599dd
# the macro
2599dd
%py3_build() %{expand:\\\
2599dd
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
2599dd
  %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}
2599dd
  sleep 1
2599dd
}
2599dd
2599dd
%py3_build_egg() %{expand:\\\
2599dd
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
2599dd
  %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}
2599dd
  sleep 1
2599dd
}
2599dd
2599dd
%py3_build_wheel() %{expand:\\\
2599dd
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
2599dd
  %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
2599dd
  sleep 1
2599dd
}
2599dd
2599dd
%py3_install() %{expand:\\\
2599dd
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
2599dd
  %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
2599dd
}
2599dd
2599dd
%py3_install_egg() %{expand:\\\
2599dd
  mkdir -p %{buildroot}%{python3_sitelib}
2599dd
  CFLAGS="%{optflags}" %{__python3} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
2599dd
}
2599dd
2599dd
%py3_install_wheel() %{expand:\\\
2599dd
  CFLAGS="%{optflags}" %{__python3} -m pip install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps
2599dd
}