For Flock (Fedora contributors' conference) in Krakow
Python Packaging in FedoraPetr Viktorin[email protected]Flock, 2016-08-02
View Slide
I. Python 3
Python 1991Java 1995
Python 1991Java 1995Python 3.0 2008Node.js 2009
Python 1991Java 1995Python 3.0 2008Node.js 2009Python 3.5 2015
Python 1991Java 1995Python 3.0 2008Node.js 2009Python 3.5 2015Python 2 EOL 2020
Python 3 Porting Databasehttp://fedora.portingdb.xyz
at least49,9%of Python softwarepackaged in Fedorasupports Python 3
at least49,9%of Python softwarepackaged in Fedorasupports Python 345,5%has the Py 3 version packaged
Help us port!3PYTHON3PYTHON3PYTHONhttp://fedora.portingdb.xyz
Fedora infraDesktop toolkitsBig non-Python apps
I. Python 3II. AutomatingPackaging
A packager should:1. Make sure SW plays nice2. Integrate with rest of system3. Check licenses, patents, etc.
A packager should:1. Make sure SW plays nice2. Integrate with rest of system3. Check licenses, patents, etc.4. Read 50 pages of guidelines5. Know a weird macro language
%global pypi_name mypkgName: python -%{pypi_name}Version: 2.4.25.1Release: 1%{?dist}License: PythonURL: https://github.com/%{pypi_name}/%{pypi_name}Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
%if 0%{?rhel} && 0%{?rhel} <= 6%{!?__python2: %global \__python2 /usr/bin/python2}%{!?python2_sitelib: %global \python2_sitelib %(%{__python2} -c%endif%if 0%{?fedora} > 12 || 0%{?rhel} >%global with_python3 1%global __python3 python3%endif
from distutils.core import setupsetup(name='mypkg ',version='2.4.25.1',author='Me',url='github.com/me/mypkg/',packages=['mypkg '],install_requires=['six '],)
Enter pyp2rpm# dnf install /usr/bin/pyp2rpm$ pyp2rpm mypkg
Enter pyp2rpm# dnf install /usr/bin/pyp2rpm$ pyp2rpm mypkgIt might actually work!
We can use pyp2rpm to...Auto-build all of PyPI in COPR!
We can use pyp2rpm to...Auto-build all of PyPI in COPR!Why?
We can use pyp2rpm to...Auto-build all of PyPI in COPR!Why?- Test pyp2rpm
We can use pyp2rpm to...Auto-build all of PyPI in COPR!Why?- Test pyp2rpm- Run upstream tests
We can use pyp2rpm to...Auto-build all of PyPI in COPR!Why?- Test pyp2rpm- Run upstream tests- Provide a repository
dnf pip install -r requirements.txt(hypothetical command)
“PyPI” name Fedora pkgpyopencl python3-pyopenclmypy-lang python3-mypy
“PyPI” name Fedora pkgpyopencl python3-pyopenclmypy-lang python3-mypy$ dnf repoquery --providespython3 -pyopencl...python3.5dist(pyopencl) = 2015.2...
“PyPI” name Fedora pkgpyopencl python3-pyopenclmypy-lang python3-mypy$ dnf repoquery --providespython3 -pyopencl...python3.5dist(pyopencl) = 2015.2...Live in Fedora 25!
I. Python 3II. Automating PackagingIII. SystemPython
System Python/usr/libexec/system-pythonAn effort to minimize minimalinstalls(cloud images)
Python stdlib by disk sizetestasyncioemailtkinterencodingsdistutilsunittestpydoc_dataensurepipctypeslib2to3idlelibindividualmodules
System Python libs/usr/libexec/system-python/usr/lib/python3.5/lib2to3unittestvenvensurepippydocencodingssqlite3collectionsloggingdistutilshtmltesttkinterturtledemoidlelibsystem-python-libspython3-libspython3-testpython3-tkinterpython3system-python/usr/bin/python3
Possible users: DNF, cloud-init
Possible users: DNF, cloud-initFuture: Isolation of systemtools?
I. Python 3II. Automating PackagingIII. System PythonIV. Python 3.6
Python 3.6* Format Strings* Large Speedups* Advanced class creation tools
Python 3.6 Alpha 1 2016-05-17Fedora 25 Alpha Freeze 2016-08-09
Python 3.6 Alpha 1 2016-05-17Fedora 25 Alpha Freeze 2016-08-09Python 3.6 Beta 1 2016-09-12Fedora 25 Beta Freeze 2016-09-20
Python 3.6 Alpha 1 2016-05-17Fedora 25 Alpha Freeze 2016-08-09Python 3.6 Beta 1 2016-09-12Fedora 25 Beta Freeze 2016-09-20Python 3.6 RC 1 2016-12-05Fedora 25 Final Freeze 2016-10-25
Python 3.6 Alpha 1 2016-05-17Fedora 25 Alpha Freeze 2016-08-09Python 3.6 Beta 1 2016-09-12Fedora 25 Beta Freeze 2016-09-20Python 3.6 RC 1 2016-12-05Fedora 25 Final Freeze 2016-10-25Python 3.6 Final 2016-12-16Fedora 26 Branches 2016-12-???
I. Python 3II. Automating PackagingIII. System PythonIV. Python 3.6V. Who's “we”?
python-maint @ Red Hat
Sorry!We'll do better!
We're Python SIGpython-devel@lists.fedoraproject.org#fedora-python on Freenodefedora-python on Github