]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix wheel generation
authorFederico Caselli <cfederico87@gmail.com>
Mon, 2 Nov 2020 21:49:55 +0000 (22:49 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 2 Nov 2020 22:08:52 +0000 (23:08 +0100)
Avoid passing LD_LIBRARY_PATH variable to the docker image used
to generate the wheels

Change-Id: I418a9574a7f49695984b1c68c997fc02f0450c12

.github/workflows/create-wheels.yaml
lib/sqlalchemy/__init__.py

index 7d08b2b712d39ff1e5f650280224cc1d33ea8d61..b11a14619c291c63ce6da2079b30ac20ab599cab 100644 (file)
@@ -174,12 +174,6 @@ jobs:
           echo $version
           echo "::set-output name=python-version::$version"
 
-      - name: Set up Python
-        uses: actions/setup-python@v2
-        with:
-          python-version: ${{ steps.linux-py-version.outputs.python-version }}
-          architecture: ${{ matrix.architecture }}
-
       - name: Remove tag_build from setup.cfg
         # sqlalchemy has `tag_build` set to `dev` in setup.cfg. We need to remove it before creating the weel
         # otherwise it gets tagged with `dev0`
@@ -193,6 +187,8 @@ jobs:
         run: |
           (cat setup.cfg) | %{$_ -replace "tag_build.?=.?dev",""} | set-content setup.cfg
 
+        # This should run before setting up python, otherwise LD_LIBRARY_PATH gets set and it will break wheel generation
+        # See https://github.com/RalfG/python-wheels-manylinux-build/issues/26#issuecomment-720736647
       - name: Create wheel for manylinux
         # this step uses the image provided by pypa here https://github.com/pypa/manylinux to generate the wheels on linux
         # the action uses the image for manylinux2010 but can generate also a manylinux1 wheel
@@ -208,6 +204,12 @@ jobs:
           # `--no-deps` is used to only generate the wheel for the current library. Redundant in sqlalchemy since it has no dependencies
           pip-wheel-args: "-w ./dist --no-use-pep517 -v --no-deps"
 
+      - name: Set up Python
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ steps.linux-py-version.outputs.python-version }}
+          architecture: ${{ matrix.architecture }}
+
       - name: Check created wheel
         # check that the wheel is compatible with the current installation.
         # If it is then does:
@@ -332,6 +334,8 @@ jobs:
         run: |
           docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
 
+        # This should run before setting up python, otherwise LD_LIBRARY_PATH gets set and it will break wheel generation
+        # See https://github.com/RalfG/python-wheels-manylinux-build/issues/26#issuecomment-720736647
       - name: Create wheel for manylinux2014
         # this step uses the image provided by pypa here https://github.com/pypa/manylinux to generate the wheels on linux
         # the action uses the image for manylinux2014 but can generate also a manylinux1 wheel
@@ -385,6 +389,7 @@ jobs:
           asset_content_type: application/zip # application/octet-stream
 
       - name: Set up Python for twine
+        # Setup python after creating the wheel, otherwise LD_LIBRARY_PATH gets set and it will break wheel generation
         # twine on py2 is very old and is no longer updated, so we change to python 3.8 before upload
         uses: actions/setup-python@v2
         with:
index 1052472501ed625cd361c1ef3945ac12db3ef10c..e3b054d0e8c8a8e2fef2321c8b9ee4a70e2c4ad2 100644 (file)
@@ -126,7 +126,7 @@ from .types import VARBINARY  # noqa
 from .types import VARCHAR  # noqa
 
 
-__version__ = '1.4.0b2'
+__version__ = "1.4.0b2"
 
 
 def __go(lcls):