Skip to content

Commit

Permalink
make releases for Python 3.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
paopre authored Apr 30, 2024
1 parent 35e9e6f commit 7136058
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
13 changes: 6 additions & 7 deletions bin/create_binary_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from pathlib import Path
import tarfile
import os.path
from distutils.dir_util import copy_tree
import glob
import re

Expand Down Expand Up @@ -56,12 +55,12 @@ def makeTarfile(output_filename, source_dir):

os.rename('dist', execDirName)

copy_tree(os.path.join(HERE, '..','tests'), os.path.join(execDirName, 'tests'))
copy_tree(os.path.join(HERE, '..','lib'), os.path.join(execDirName, 'lib'))
copy_tree(os.path.join(HERE, '..','documentation'), os.path.join(execDirName, 'documentation'))
copy_tree(os.path.join(HERE, '..', 'examples'), os.path.join(execDirName, 'examples'))
copy_tree(os.path.join(HERE, '..', 'plugins'), os.path.join(execDirName, 'plugins'))
copy_tree(os.path.join(HERE, '..', 'templates'), os.path.join(execDirName, 'templates'))
shutil.copytree(os.path.join(HERE, '..','tests'), os.path.join(execDirName, 'tests'))
shutil.copytree(os.path.join(HERE, '..','lib'), os.path.join(execDirName, 'lib'))
shutil.copytree(os.path.join(HERE, '..','documentation'), os.path.join(execDirName, 'documentation'))
shutil.copytree(os.path.join(HERE, '..', 'examples'), os.path.join(execDirName, 'examples'))
shutil.copytree(os.path.join(HERE, '..', 'plugins'), os.path.join(execDirName, 'plugins'))
shutil.copytree(os.path.join(HERE, '..', 'templates'), os.path.join(execDirName, 'templates'))
shutil.copyfile(os.path.join(HERE, '..', 'LICENSE'), os.path.join(execDirName, 'LICENSE'))
shutil.copyfile(os.path.join(HERE, '..', 'NEWS.txt'), os.path.join(execDirName, 'NEWS.txt'))
shutil.copyfile(os.path.join(HERE, '..', 'README.md'), os.path.join(execDirName, 'README.md'))
Expand Down
9 changes: 7 additions & 2 deletions bin/create_binary_dist_on_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#!/bin/bash

PYTHON_VERSION=3.9.1
PYENV_VERSION=2.3.11
PYTHON_VERSION=3.11.0
PYENV_VERSION=2.4.0
UBUNTU_VERSION=18.04

SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
Expand All @@ -30,6 +30,8 @@ setfacl -m u:1000:rwx $SCRIPTPATH/..
docker create ubuntu:$UBUNTU_VERSION

# run the container with mounting Spontini src tree mapped as /Spontini
docker stop ubuntu_for_pyinstaller
docker rm ubuntu_for_pyinstaller
docker run -v $SCRIPTPATH/..:/Spontini -d --name ubuntu_for_pyinstaller -it ubuntu:$UBUNTU_VERSION

docker exec ubuntu_for_pyinstaller bash -c "\
Expand All @@ -43,6 +45,9 @@ usermod -aG sudo dummyuser &&
su dummyuser &&
curl -LO https://github.com/pyenv/pyenv/archive/refs/tags/v$PYENV_VERSION.tar.gz &&
tar zxvf v$PYENV_VERSION.tar.gz &&
# workaround for this issue: https://github.com/pyenv/pyenv/issues/2499
export TCLTK_LIBS=\"-L/usr/lib/x86_64-linux-gnu -ltcl -ltk\" &&
export TCLTK_CFLAGS=\"-I/usr/include/tk\" &&
pyenv-$PYENV_VERSION/bin/./pyenv install -v $PYTHON_VERSION &&
cd /Spontini/bin/ &&
~/.pyenv/versions/$PYTHON_VERSION/bin/python3 create_binary_dist.py &&
Expand Down

0 comments on commit 7136058

Please sign in to comment.