Churchyard (talk | contribs) No edit summary |
Churchyard (talk | contribs) |
||
Line 61: | Line 61: | ||
<!-- Expand on the summary, if appropriate. A couple sentences suffices to explain the goal, but the more details you can provide the better. --> | <!-- Expand on the summary, if appropriate. A couple sentences suffices to explain the goal, but the more details you can provide the better. --> | ||
Example specfile of a package that will have a system-python- subpackage: | |||
%global pypi_name foo | |||
Name: python-%{pypi_name} | |||
Version: 0.13 | |||
Release: 1%{?dist} | |||
Summary: Python %{pypi_name} module | |||
License: GPLv2 | |||
URL: https://github.com/fedora-python/%{name} | |||
Source0: https://files.pythonhosted.org/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz | |||
BuildRequires: python2-devel | |||
BuildRequires: python2-setuptools | |||
BuildRequires: python3-devel | |||
BuildRequires: python3-setuptools | |||
BuildRequires: system-python-devel | |||
BuildRequires: system-python-setuptools | |||
BuildArch: noarch | |||
%description | |||
... | |||
%package -n python2-%{pypi_name} | |||
Summary: %{summary} | |||
Requires: python2-bar | |||
%{?python_provide:%python_provide python2-%{pypi_name}} | |||
%description -n python2-%{pypi_name} | |||
... | |||
%package -n python3-%{pypi_name} | |||
Summary: %{summary} | |||
Requires: python3-bar | |||
%{?python_provide:%python_provide python3-%{pypi_name}} | |||
%description -n python3-%{pypi_name} | |||
... | |||
%package -n system-python-%{pypi_name} | |||
Summary: %{summary} | |||
Requires: system-python-bar | |||
%description -n system-python-%{pypi_name} | |||
... | |||
%prep | |||
%autosetup -n %{pypi_name}-%{version} | |||
%build | |||
%py2_build | |||
%py3_build | |||
%sypy_build | |||
%install | |||
%py2_install | |||
rm %{buildroot}%{_bindir}/%{pypi_name} | |||
%sypy_install | |||
rm %{buildroot}%{_bindir}/%{pypi_name} | |||
%py3_install | |||
%check | |||
export PYTHONPATH=%{buildroot}%{python2_sitelib} | |||
%{__python2} -m unittest discover -v | |||
export PYTHONPATH=%{buildroot}%{python3_sitelib} | |||
%{__python3} -m unittest discover -v | |||
export PYTHONPATH=%{buildroot}%{systempython_sitelib} | |||
%{__systempython} -m unittest discover -v | |||
%files -n python2-%{pypi_name} | |||
%doc README.rst CHANGES.rst | |||
%license COPYING | |||
%{python2_sitelib}/%{pypi_name}.so | |||
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info | |||
%files -n python3-%{pypi_name} | |||
%doc README.rst CHANGES.rst | |||
%license COPYING | |||
%{_bindir}/%{pypi_name} | |||
%{python3_sitelib}/%{pypi_name}.cpython-%{python3_version_nodots}*.so | |||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info | |||
%files -n system-python-%{pypi_name} | |||
%doc README.rst CHANGES.rst | |||
%license COPYING | |||
%{systempython_sitelib}/%{pypi_name}.cpython-%{systempython_version_nodots}*.so | |||
%{systempython_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info | |||
%changelog | |||
... | |||
== Benefit to Fedora == | == Benefit to Fedora == |
Revision as of 17:13, 30 June 2017
System Python Stack
Summary
A revisit of the System Python change from Fedora 24. System Python will be a separate stack fo Python packages aimed to provide all necessary dependencies to run and build dnf. In Fedora 27 this will be Python 3.6 (same version as
, but this might change in the future with the Modularity effort).
python3
Owner
- Name: Miro Hrončok
- Email: <python-maint at redhat.com>
- Release notes owner:
Current status
- Targeted release: Fedora 27
- Last updated: 2017-06-30
- Tracker bug: <will be assigned by the Wrangler>
Detailed Description
Example specfile of a package that will have a system-python- subpackage:
%global pypi_name foo Name: python-%{pypi_name} Version: 0.13 Release: 1%{?dist} Summary: Python %{pypi_name} module License: GPLv2 URL: https://github.com/fedora-python/%{name} Source0: https://files.pythonhosted.org/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: system-python-devel BuildRequires: system-python-setuptools BuildArch: noarch %description ... %package -n python2-%{pypi_name} Summary: %{summary} Requires: python2-bar %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} ... %package -n python3-%{pypi_name} Summary: %{summary} Requires: python3-bar %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} ... %package -n system-python-%{pypi_name} Summary: %{summary} Requires: system-python-bar %description -n system-python-%{pypi_name} ... %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %py3_build %sypy_build %install %py2_install rm %{buildroot}%{_bindir}/%{pypi_name} %sypy_install rm %{buildroot}%{_bindir}/%{pypi_name} %py3_install %check export PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m unittest discover -v export PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m unittest discover -v export PYTHONPATH=%{buildroot}%{systempython_sitelib} %{__systempython} -m unittest discover -v %files -n python2-%{pypi_name} %doc README.rst CHANGES.rst %license COPYING %{python2_sitelib}/%{pypi_name}.so %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %doc README.rst CHANGES.rst %license COPYING %{_bindir}/%{pypi_name} %{python3_sitelib}/%{pypi_name}.cpython-%{python3_version_nodots}*.so %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n system-python-%{pypi_name} %doc README.rst CHANGES.rst %license COPYING %{systempython_sitelib}/%{pypi_name}.cpython-%{systempython_version_nodots}*.so %{systempython_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog ...
Benefit to Fedora
With the Modularity effort a minimal stack of Python only needed to run dnf is needed to be part of the Platform. Changing System Python to be a separate stack will allow us to do that.
Scope
- Proposal owners:
- identify a list of runtime and build dependencies of dnf
- create a system-python source package
- add a system-python- subpackage to identified list of packages
- switch dnf to use that stack
- Other developers: N/A (not a System Wide Change)
- Release engineering: #Releng issue number (a check of an impact with Release Engineering is needed)
- List of deliverables: N/A (not a System Wide Change)
- Policies and guidelines: N/A (not a System Wide Change)
- Trademark approval: N/A (not needed for this Change)
Upgrade/compatibility impact
N/A (not a System Wide Change)
How To Test
N/A (not a System Wide Change)
User Experience
Nothing should change for the user, except a slightly larger amount of packages will be installed on the system.
Dependencies
N/A (not a System Wide Change)
Contingency Plan
- Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
- Contingency deadline: N/A (not a System Wide Change)
- Blocks release? N/A (not a System Wide Change), Yes/No
- Blocks product? product
If not done on time: Keep dnf running on
. Finish the work in time of Fedora 28.
python3
If proven not to work as designed: Retire system-python package and remove all the system-python- subpackages. Provide/obsolete system-python- subpackages from their python3- counterparts.
Documentation
N/A (not a System Wide Change)