1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-10-02 14:31:05 +02:00

return --force-reinstall option to manual Python installation

This commit is contained in:
q-posev 2022-01-19 14:09:28 +01:00
parent e9db0c66d4
commit 2ce3f09c7f

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
set -x set -x
set -e set -e
@ -38,12 +38,12 @@ python3 -m pip install -r requirements.txt
# Create build directory and compile extension files (*.c) # Create build directory and compile extension files (*.c)
# --no-user-cfg disables custom .cfg files of the user machine, so that only setup.cfg is used # --no-user-cfg disables custom .cfg files of the user machine, so that only setup.cfg is used
#python3 -s setup.py --no-user-cfg build #python3 -s setup.py --no-user-cfg build
# Local inplace build of the .so module with SWIG-produced pytrexio_wrap.c (from the SWIG documentation) # Local inplace build of the .so module with SWIG-produced pytrexio_wrap.c (from the SWIG documentation)
#python3 setup.py build_ext --inplace --swig-opts="-modern" #python3 setup.py build_ext --inplace --swig-opts="-modern"
# Create distributions: # Create distributions:
# OLD WAY (DEPRECATED BY PYPA) # OLD WAY (DEPRECATED BY PYPA)
# 1) sdist produces .tar.gz with all files necessary for manual compilation; # 1) sdist produces .tar.gz with all files necessary for manual compilation;
@ -54,14 +54,7 @@ python3 -m pip install -r requirements.txt
python3 -m build --sdist --wheel --outdir dist/ python3 -m build --sdist --wheel --outdir dist/
# Install pytrexio in the current environment from the aforementioned wheel # Install pytrexio in the current environment from the aforementioned wheel
python3 -m pip install dist/trexio-*.whl --force-reinstall
# OLD WAY
# --force-reinstall is needed here because build-system pre-installs pytrexio in the environment
# but does not install things in the corresponding site-packages directory
#python3 -m pip install dist/trexio-*.whl --force-reinstall
# NEW WAY
python3 -m pip install dist/trexio-*.whl
# Run the command below in the root directory to install the package in 'editable' (-e) mode without dependencies (--no-deps) # Run the command below in the root directory to install the package in 'editable' (-e) mode without dependencies (--no-deps)
#python -m pip install -e . --no-deps #python -m pip install -e . --no-deps
@ -83,7 +76,6 @@ rm -rf build dist trexio.egg-info
# Additional information related to the installation of the TREXIO Python API # Additional information related to the installation of the TREXIO Python API
#Removing MANIFEST.in leads to issues in the installation. In particular, the .c and .h source files do not get copied #Removing MANIFEST.in leads to issues in the installation. In particular, the .c and .h source files do not get copied
#from the src/ directory into the tar.gz which is produced by setup sdist command. #from the src/ directory into the tar.gz which is produced by setup sdist command.
#These source files are required to build the pytrexio.so extension module, which is needed for the Python API. #These source files are required to build the pytrexio.so extension module, which is needed for the Python API.