Skip to content

Conversation

@arm4b
Copy link
Member

@arm4b arm4b commented Dec 4, 2020

Relevant to: StackStorm/st2-packages#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 arm4b added the feature label Dec 4, 2020
@arm4b arm4b requested review from a team, amanda11 and blag December 7, 2020 11:49
Copy link
Contributor

@blag blag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to fix, but otherwise looks good. Thanks!

Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no comments on top of those already given.
I wasn't sure if python-virtualenv or python3.6-virtualenv was required.

Co-authored-by: blag <blag@users.noreply.github.com>
@arm4b
Copy link
Member Author

arm4b commented Dec 7, 2020

@amanda11 python-virtualenv package is needed by the dh-virtualenv per 17779cf
And python3 virtualenv is installed via pip3, that's required to build st2.

@blag
Copy link
Contributor

blag commented Dec 7, 2020

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 blag merged commit a636133 into master Dec 7, 2020
@blag blag deleted the feature/xenial-py3.6 branch December 7, 2020 22:02
@blag
Copy link
Contributor

blag commented Dec 7, 2020

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

@arm4b
Copy link
Member Author

arm4b commented Dec 8, 2020

@blag Nice one! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants