From 685c3e44f5d05eff0ad2f206d4301afd371a6ca7 Mon Sep 17 00:00:00 2001 From: Szczepanski Nicolas Date: Thu, 12 Oct 2023 14:33:47 +0200 Subject: [PATCH] Version 1.0.7 release --- publish_pypi.py | 11 -- pypi/publish_pypi.py | 42 ++-- pyxai/version.txt | 2 +- update_pypi_version-OSX.py | 32 --- update_pypi_version.py | 32 --- valgrind-python.supp | 391 ------------------------------------- 6 files changed, 17 insertions(+), 493 deletions(-) delete mode 100644 publish_pypi.py delete mode 100644 update_pypi_version-OSX.py delete mode 100644 update_pypi_version.py delete mode 100644 valgrind-python.supp diff --git a/publish_pypi.py b/publish_pypi.py deleted file mode 100644 index 852fe8a..0000000 --- a/publish_pypi.py +++ /dev/null @@ -1,11 +0,0 @@ -import os - -print("Please use the 'gh auth login' command to connect the github API.") -print("Type 'enter' to execute: 'gh auth login'") -input() - -os.system("gh run download") - -print("Type 'enter' to publish the wheels on pypi:") -input() -os.system("python3 -m twine upload --skip-existing *.whl") diff --git a/pypi/publish_pypi.py b/pypi/publish_pypi.py index 070f9a7..23d9b9e 100644 --- a/pypi/publish_pypi.py +++ b/pypi/publish_pypi.py @@ -1,32 +1,22 @@ import os -versionFile = os.getcwd() + os.sep + "pyxai" + os.sep + "version.txt" -__version__ = open(versionFile, encoding='utf-8').read() - -print("Type on the keyboard the new version number (current " + str(__version__) + ") ?") - -new_version = input() -if new_version != "": - print("Write the new version ...") - with open(versionFile, "r+") as f: - data = f.read() - f.seek(0) - f.write(new_version) - f.truncate() - -# print("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/ pyxai.egg-info/") - -os.system("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/ pyxai.egg-info/") - -# print("Type Enter to execute python3 setup.py sdist bdist_wheel") -# input() -# os.system("python3 setup.py sdist bdist_wheel") - -print("Type Enter to execute the docker that build whells:") +# How to build, test and publish on pypi a new version: +# - Put the good version in the pyxai/version.txt file +# - Push on the public github of pyxai +# - Two github actions are launch: Build and Tests +# - The github action Build create the wheels for pypi +# - The github action Build create the wheels for pypi +# - This script get the last wheels and publish them on pypi. + +print("Please use the 'gh auth login' command to connect the github API.") +print("Type 'enter' to execute: 'gh run download'") input() -os.system("sudo docker run --rm -e PLAT=manylinux2014_x86_64 -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/travis/build-wheels.sh") +os.system("gh run download") -print("Type Enter to execute the publish on pypi the wheels:") +print("Type 'enter' to publish the wheels on pypi:") input() -os.system("python3 -m twine upload --skip-existing wheelhouse/*.whl") +os.system("python3 -m twine upload --skip-existing *.whl") + +print("Type 'enter' to delete the whell:") +input("rm -rf *.whl") diff --git a/pyxai/version.txt b/pyxai/version.txt index af0b7dd..238d6e8 100644 --- a/pyxai/version.txt +++ b/pyxai/version.txt @@ -1 +1 @@ -1.0.6 +1.0.7 diff --git a/update_pypi_version-OSX.py b/update_pypi_version-OSX.py deleted file mode 100644 index ff2f6a5..0000000 --- a/update_pypi_version-OSX.py +++ /dev/null @@ -1,32 +0,0 @@ -import os - -versionFile = os.getcwd() + os.sep + "pyxai" + os.sep + "version.txt" -__version__ = open(versionFile, encoding='utf-8').read() - -print("Type on the keyboard the new version number (current " + str(__version__) + ") ?") - -new_version = input() -if new_version != "": - print("Write the new version ...") - with open(versionFile, "r+") as f: - data = f.read() - f.seek(0) - f.write(new_version) - f.truncate() - -print("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/") - -os.system("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/") - -# print("Type Enter to execute python3 setup.py sdist bdist_wheel") -# input() -# os.system("python3 setup.py sdist bdist_wheel") - -print("Type Enter to execute the docker that build whells:") -input() - -os.system("sudo docker run --rm -e PLAT=manylinux2014_aarch64 -v `pwd`:/io quay.io/pypa/manylinux2014_aarch64 /io/travis/build-wheels.sh") - -print("Type Enter to execute the publish on pypi the wheels:") -input() -os.system("python3 -m twine upload --skip-existing wheelhouse/*") diff --git a/update_pypi_version.py b/update_pypi_version.py deleted file mode 100644 index 070f9a7..0000000 --- a/update_pypi_version.py +++ /dev/null @@ -1,32 +0,0 @@ -import os - -versionFile = os.getcwd() + os.sep + "pyxai" + os.sep + "version.txt" -__version__ = open(versionFile, encoding='utf-8').read() - -print("Type on the keyboard the new version number (current " + str(__version__) + ") ?") - -new_version = input() -if new_version != "": - print("Write the new version ...") - with open(versionFile, "r+") as f: - data = f.read() - f.seek(0) - f.write(new_version) - f.truncate() - -# print("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/ pyxai.egg-info/") - -os.system("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/ pyxai.egg-info/") - -# print("Type Enter to execute python3 setup.py sdist bdist_wheel") -# input() -# os.system("python3 setup.py sdist bdist_wheel") - -print("Type Enter to execute the docker that build whells:") -input() - -os.system("sudo docker run --rm -e PLAT=manylinux2014_x86_64 -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/travis/build-wheels.sh") - -print("Type Enter to execute the publish on pypi the wheels:") -input() -os.system("python3 -m twine upload --skip-existing wheelhouse/*.whl") diff --git a/valgrind-python.supp b/valgrind-python.supp deleted file mode 100644 index 15982cc..0000000 --- a/valgrind-python.supp +++ /dev/null @@ -1,391 +0,0 @@ -# -# This is a valgrind suppression file that should be used when using valgrind. -# -# Here's an example of running valgrind: -# -# cd python/dist/src -# valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \ -# ./python -E -tt ./Lib/test/regrtest.py -u bsddb,network -# -# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER -# to use the preferred suppressions with Py_ADDRESS_IN_RANGE. -# -# If you do not want to recompile Python, you can uncomment -# suppressions for PyObject_Free and PyObject_Realloc. -# -# See Misc/README.valgrind for more information. - -# all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif -{ - ADDRESS_IN_RANGE/Invalid read of size 4 - Memcheck:Addr4 - fun:Py_ADDRESS_IN_RANGE -} - -{ - ADDRESS_IN_RANGE/Invalid read of size 4 - Memcheck:Value4 - fun:Py_ADDRESS_IN_RANGE -} - -{ - ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64) - Memcheck:Value8 - fun:Py_ADDRESS_IN_RANGE -} - -{ - ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value - Memcheck:Cond - fun:Py_ADDRESS_IN_RANGE -} - -# -# Leaks (including possible leaks) -# Hmmm, I wonder if this masks some real leaks. I think it does. -# Will need to fix that. -# - -{ - Suppress leaking the GIL. Happens once per process, see comment in ceval.c. - Memcheck:Leak - fun:malloc - fun:PyThread_allocate_lock - fun:PyEval_InitThreads -} - -{ - Suppress leaking the GIL after a fork. - Memcheck:Leak - fun:malloc - fun:PyThread_allocate_lock - fun:PyEval_ReInitThreads -} - -{ - Suppress leaking the autoTLSkey. This looks like it shouldn't leak though. - Memcheck:Leak - fun:malloc - fun:PyThread_create_key - fun:_PyGILState_Init - fun:Py_InitializeEx - fun:Py_Main -} - -{ - Hmmm, is this a real leak or like the GIL? - Memcheck:Leak - fun:malloc - fun:PyThread_ReInitTLS -} - -{ - Handle PyMalloc confusing valgrind (possibly leaked) - Memcheck:Leak - fun:realloc - fun:_PyObject_GC_Resize - fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING -} - -{ - Handle PyMalloc confusing valgrind (possibly leaked) - Memcheck:Leak - fun:malloc - fun:_PyObject_GC_New - fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING -} - -{ - Handle PyMalloc confusing valgrind (possibly leaked) - Memcheck:Leak - fun:malloc - fun:_PyObject_GC_NewVar - fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING -} - -# -# Non-python specific leaks -# - -{ - Handle pthread issue (possibly leaked) - Memcheck:Leak - fun:calloc - fun:allocate_dtv - fun:_dl_allocate_tls_storage - fun:_dl_allocate_tls -} - -{ - Handle pthread issue (possibly leaked) - Memcheck:Leak - fun:memalign - fun:_dl_allocate_tls_storage - fun:_dl_allocate_tls -} - -{ - ADDRESS_IN_RANGE/Invalid read of size 4 - Memcheck:Addr4 - fun:PyObject_Free -} - -{ - ADDRESS_IN_RANGE/Invalid read of size 4 - Memcheck:Value4 - fun:PyObject_Free -} - -{ - ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value - Memcheck:Cond - fun:PyObject_Free -} - -{ - ADDRESS_IN_RANGE/Invalid read of size 4 - Memcheck:Addr4 - fun:PyObject_Realloc -} - -{ - ADDRESS_IN_RANGE/Invalid read of size 4 - Memcheck:Value4 - fun:PyObject_Realloc -} - -{ - ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value - Memcheck:Cond - fun:PyObject_Realloc -} - -### -### All the suppressions below are for errors that occur within libraries -### that Python uses. The problems to not appear to be related to Python's -### use of the libraries. -### - -{ - Generic ubuntu ld problems - Memcheck:Addr8 - obj:/lib/ld-2.4.so - obj:/lib/ld-2.4.so - obj:/lib/ld-2.4.so - obj:/lib/ld-2.4.so -} - -{ - Generic gentoo ld problems - Memcheck:Cond - obj:/lib/ld-2.3.4.so - obj:/lib/ld-2.3.4.so - obj:/lib/ld-2.3.4.so - obj:/lib/ld-2.3.4.so -} - -{ - DBM problems, see test_dbm - Memcheck:Param - write(buf) - fun:write - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - fun:dbm_close -} - -{ - DBM problems, see test_dbm - Memcheck:Value8 - fun:memmove - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - fun:dbm_store - fun:dbm_ass_sub -} - -{ - DBM problems, see test_dbm - Memcheck:Cond - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - fun:dbm_store - fun:dbm_ass_sub -} - -{ - DBM problems, see test_dbm - Memcheck:Cond - fun:memmove - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - obj:/usr/lib/libdb1.so.2 - fun:dbm_store - fun:dbm_ass_sub -} - -{ - GDBM problems, see test_gdbm - Memcheck:Param - write(buf) - fun:write - fun:gdbm_open - -} - -{ - ZLIB problems, see test_gzip - Memcheck:Cond - obj:/lib/libz.so.1.2.3 - obj:/lib/libz.so.1.2.3 - fun:deflate -} - -{ - Avoid problems w/readline doing a putenv and leaking on exit - Memcheck:Leak - fun:malloc - fun:xmalloc - fun:sh_set_lines_and_columns - fun:_rl_get_screen_size - fun:_rl_init_terminal_io - obj:/lib/libreadline.so.4.3 - fun:rl_initialize -} - -### -### These occur from somewhere within the SSL, when running -### test_socket_sll. They are too general to leave on by default. -### -###{ -### somewhere in SSL stuff -### Memcheck:Cond -### fun:memset -###} -###{ -### somewhere in SSL stuff -### Memcheck:Value4 -### fun:memset -###} -### -###{ -### somewhere in SSL stuff -### Memcheck:Cond -### fun:MD5_Update -###} -### -###{ -### somewhere in SSL stuff -### Memcheck:Value4 -### fun:MD5_Update -###} - -# -# All of these problems come from using test_socket_ssl -# -{ - from test_socket_ssl - Memcheck:Cond - fun:BN_bin2bn -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:BN_num_bits_word -} - -{ - from test_socket_ssl - Memcheck:Value4 - fun:BN_num_bits_word -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:BN_mod_exp_mont_word -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:BN_mod_exp_mont -} - -{ - from test_socket_ssl - Memcheck:Param - write(buf) - fun:write - obj:/usr/lib/libcrypto.so.0.9.7 -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:RSA_verify -} - -{ - from test_socket_ssl - Memcheck:Value4 - fun:RSA_verify -} - -{ - from test_socket_ssl - Memcheck:Value4 - fun:DES_set_key_unchecked -} - -{ - from test_socket_ssl - Memcheck:Value4 - fun:DES_encrypt2 -} - -{ - from test_socket_ssl - Memcheck:Cond - obj:/usr/lib/libssl.so.0.9.7 -} - -{ - from test_socket_ssl - Memcheck:Value4 - obj:/usr/lib/libssl.so.0.9.7 -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:BUF_MEM_grow_clean -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:memcpy - fun:ssl3_read_bytes -} - -{ - from test_socket_ssl - Memcheck:Cond - fun:SHA1_Update -} - -{ - from test_socket_ssl - Memcheck:Value4 - fun:SHA1_Update -} - -