StackStorm / st2packaging-dockerfiles

Dockerfiles used to build and test StackStorm deb/rpm packages
https://github.com/StackStorm/st2-packages
32 stars 33 forks source link

Add python 3.6 from PPA for Ubuntu Xenial #94

Closed arm4b closed 3 years ago

arm4b commented 3 years ago

Relevant to: https://github.com/StackStorm/st2-packages/pull/679

Install python 3.6 and development packages for Ubuntu Xenial from Deadsnakes PPA (https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) so we could build the U16 st2 deb/rpm packages relying on py3.

Ubuntu Xenial gotchas, to be careful:

vagrant@ubuntu16:~$ python --version
Python 2.7.12
vagrant@ubuntu16:~$ python3 --version
Python 3.5.2
vagrant@ubuntu16:~$ python3.6 --version
Python 3.6.12

Interesting Deadsnakes PPA notes:

Disclaimer: there's no guarantee of timely updates in case of security problems or other issues. If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk.

arm4b commented 3 years ago

@amanda11 python-virtualenv package is needed by the dh-virtualenv per https://github.com/StackStorm/st2packaging-dockerfiles/pull/94/commits/17779cf10a84524557b66b3ca316654ed5d43174 And python3 virtualenv is installed via pip3, that's required to build st2.

blag commented 3 years ago

We should update our dh-virtualenv fork from spotify:master, since I think this is still building dh-virtualenv with Python 2.7:

Cloning into '/tmp/dh-virtualenv'...
remote: Enumerating objects: 1094, done.
remote: Total 1094 (delta 0), reused 0 (delta 0), pack-reused 1094
Receiving objects: 100% (1094/1094), 277.81 KiB | 0 bytes/s, done.
Resolving deltas: 100% (572/572), done.
Checking connectivity... done.
dpkg-buildpackage: source package dh-virtualenv
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Jyrki Pulliainen <jyrki@spotify.com>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build dh-virtualenv
 debian/rules clean
dh clean --with python2
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/tmp/dh-virtualenv'
rm -rf doc/_build
rm -f doc/dh_virtualenv.1
rm -rf dh_virtualenv.egg-info
dh_auto_clean
    python setup.py clean -a
running clean
'build/lib.linux-x86_64-2.7' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
    find . -name \*.pyc -exec rm {} \+
make[1]: Leaving directory '/tmp/dh-virtualenv'
   dh_clean
 debian/rules build
dh build --with python2
   dh_testdir
   dh_update_autotools_config
   dh_auto_configure
   debian/rules override_dh_auto_build
make[1]: Entering directory '/tmp/dh-virtualenv'
dh_auto_build
    python setup.py build --force
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/dh_virtualenv
copying dh_virtualenv/deployment.py -> build/lib.linux-x86_64-2.7/dh_virtualenv
copying dh_virtualenv/__init__.py -> build/lib.linux-x86_64-2.7/dh_virtualenv
copying dh_virtualenv/cmdline.py -> build/lib.linux-x86_64-2.7/dh_virtualenv
running build_scripts
creating build/scripts-2.7
copying and adjusting bin/dh_virtualenv -> build/scripts-2.7
changing mode of build/scripts-2.7/dh_virtualenv from 644 to 755
make[1]: Leaving directory '/tmp/dh-virtualenv'
   dh_auto_test
 debian/rules binary
dh binary --with python2
   dh_testroot
   dh_prep
   dh_auto_install
    python setup.py install --force --root=/tmp/dh-virtualenv/debian/dh-virtualenv --no-compile -O0 --install-layout=deb
running install
running build
running build_py
running build_scripts
running install_lib
creating /tmp/dh-virtualenv/debian/dh-virtualenv/usr
creating /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib
creating /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7
creating /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7/dist-packages
creating /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7/dist-packages/dh_virtualenv
copying build/lib.linux-x86_64-2.7/dh_virtualenv/deployment.py -> /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7/dist-packages/dh_virtualenv
copying build/lib.linux-x86_64-2.7/dh_virtualenv/__init__.py -> /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7/dist-packages/dh_virtualenv
copying build/lib.linux-x86_64-2.7/dh_virtualenv/cmdline.py -> /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7/dist-packages/dh_virtualenv
running install_egg_info
running egg_info
creating dh_virtualenv.egg-info
writing dh_virtualenv.egg-info/PKG-INFO
writing top-level names to dh_virtualenv.egg-info/top_level.txt
writing dependency_links to dh_virtualenv.egg-info/dependency_links.txt
writing manifest file 'dh_virtualenv.egg-info/SOURCES.txt'
reading manifest file 'dh_virtualenv.egg-info/SOURCES.txt'
writing manifest file 'dh_virtualenv.egg-info/SOURCES.txt'
Copying dh_virtualenv.egg-info to /tmp/dh-virtualenv/debian/dh-virtualenv/usr/lib/python2.7/dist-packages/dh_virtualenv-1.0.egg-info
Skipping SOURCES.txt
running install_scripts
creating /tmp/dh-virtualenv/debian/dh-virtualenv/usr/bin
copying build/scripts-2.7/dh_virtualenv -> /tmp/dh-virtualenv/debian/dh-virtualenv/usr/bin
changing mode of /tmp/dh-virtualenv/debian/dh-virtualenv/usr/bin/dh_virtualenv to 755
   dh_install
   dh_installdocs
   dh_installchangelogs
   dh_python2
W: dh_python2:479: Please add dh-python package to Build-Depends
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_installdeb
   dh_gencontrol
dpkg-gencontrol: warning: package dh-virtualenv: unused substitution variable ${perl:Depends}
dpkg-gencontrol: warning: package dh-virtualenv: unused substitution variable ${python:Versions}
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'dh-virtualenv' in '../dh-virtualenv_1.0-1_all.deb'.
 dpkg-genchanges -b >../dh-virtualenv_1.0-1_amd64.changes
dpkg-genchanges: binary-only upload (no source code included)
 dpkg-source --after-build dh-virtualenv
dpkg-buildpackage: binary-only upload (no source included)
Selecting previously unselected package dh-virtualenv.
(Reading database ... 25179 files and directories currently installed.)
Preparing to unpack ../dh-virtualenv_1.0-1_all.deb ...
Unpacking dh-virtualenv (1.0-1) ...
Setting up dh-virtualenv (1.0-1) ...

We are 150 commits behind and spotify/dh-virtualenv:master only has about 400 commits total, so there's definitely been some churn there.

But that's separate from this.

blag commented 3 years ago

Upstreamed our changes to spotify/dh-virtualenv#317.

arm4b commented 3 years ago

@blag Nice one! :100: