Anons79 Mini Shell

Directory : /etc/rpm/
Upload File :
Current File : //etc/rpm/macros.python3.rh-python38

# define these macros in a way which will expand them to correct values even for non-scl-build, assuming 's/python38//'
%python38__python3 /opt/rh/rh-python38/root/usr/bin/python3
%python38__python %python38__python3
%python38python3_sitelib %(%{?scl:scl enable rh-python38 '}%{python38__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())"%{?scl:'})
%python38python3_sitearch %(%{?scl:scl enable rh-python38 '}%{python38__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"%{?scl:'})

%python38python3_version %(%{?scl:scl enable rh-python38 '}%{python38__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])"%{?scl:'})
%python38python3_version_nodots %(%{?scl:scl enable rh-python38 "}%{python38__python3} -Ic \\"import sys; sys.stdout.write(sys.version[:3].replace('.',''))\\"%{?scl:'})

%python38python3_platform %(%{?scl:scl enable rh-python38 '}%{python38__python3} -Ic "import sysconfig; print(sysconfig.get_platform())"%{?scl:'})
%python38py3dir %{_builddir}/python3-%{name}-%{version}-%{release}

%python38py_setup setup.py
%python38py3_shbang_opts -s

# Use the slashes after expand so that the command starts on the same line as
# the macro
%python38py3_build() %{expand:\\\
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
  %{python38__python3} %{python38py_setup} %{?py_setup_args} build --executable="%{python38__python3} %{python38py3_shbang_opts}" %{?*}\\\
  %{?scl:'}
  sleep 1
}

%python38py3_build_egg() %{expand:\\\
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
  %{python38__python3} %{python38py_setup} %{?py_setup_args} bdist_egg %{?*}\\\
  %{?scl:'}
  sleep 1
}

%python38py3_build_wheel() %{expand:\\\
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
  %{python38__python3} %{python38py_setup} %{?py_setup_args} bdist_wheel %{?*}\\\
  %{?scl:'}
  sleep 1
}

%python38py3_install() %{expand:\\\
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
  %{python38__python3} %{python38py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\\\
  %{?scl:'}
}

%python38py3_install_egg() %{expand:\\\
  mkdir -p %{buildroot}%{python3_sitelib}
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="%{optflags}" %{python38__python3} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}\\\
  %{?scl:'}
}

%python38py3_install_wheel() %{expand:\\\
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="%{optflags}" %{python38__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps\\\
  %{?scl:'}
}

%python38py3_install_wheel_start() %{expand:\\\
  %{?scl:scl enable rh-python38 '}\\\
  CFLAGS="%{optflags}" %{python38__python3} -m pip install -I dist/}

%python38py3_install_wheel_end() %{expand:\\\
  --root %{buildroot} --no-deps\\\
  %{?scl:'}\\\
}

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]