Skip to content

Commit

Permalink
Give it a shot
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinariojoe committed Aug 19, 2024
1 parent c005d68 commit 165f5cc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-wheels-emulated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
os: ${{ fromJSON(inputs.os) }}
env:
# Skip 32-bit windows wheels builds.
CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-* *musllinux*ppc64le*"
CIBW_SKIP: "*-win32* *musllinux*ppc64le*"
CIBW_ARCHS: ${{inputs.arch}}
CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib"
CIBW_BEFORE_ALL_LINUX: >
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python-Wheels

on:
push:
branches: [ $default-branch, master ]
branches: [ $default-branch, master, python ]

permissions: write-all

Expand Down Expand Up @@ -44,63 +44,63 @@ jobs:

build_Linux_x86_64:
name: Build Linux_x86_64
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "x86_64"
secrets: inherit

build_Windows_AMD64:
name: Build Windows_AMD64
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["windows-latest"]'
arch: "AMD64"
secrets: inherit

build_MacOS_x86_64:
name: Build MacOS_x86_64
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["macOS-13"]'
arch: "x86_64"
secrets: inherit

build_MacOS_arm64:
name: Build MacOS_arm64
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["macOS-14"]'
arch: "arm64"
secrets: inherit

build_Linux_i686:
name: Build Linux_i686
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "i686"
secrets: inherit

build_Linux_aarch64:
name: Build Linux_aarch64
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "aarch64"
secrets: inherit

build_Linux_ppc64le:
name: Build Linux_ppc64le
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "ppc64le"
secrets: inherit

build_Linux_s390x:
name: Build Linux_s390x
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "s390x"
Expand All @@ -109,7 +109,7 @@ jobs:
test_Linux_x86_64:
name: Test Linux_x86_64
needs: [build_Linux_x86_64]
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-test.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "x86_64"
Expand All @@ -118,7 +118,7 @@ jobs:
test_Windows_AMD64:
name: Test Windows_AMD64
needs: [build_Windows_AMD64]
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-test.yml@python
with:
os: '["windows-latest"]'
arch: "AMD64"
Expand All @@ -127,7 +127,7 @@ jobs:
test_MacOS_arm64:
name: Test MacOS_arm64
needs: [build_MacOS_arm64]
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-test.yml@python
with:
os: '["macOS-14"]'
arch: "arm64"
Expand All @@ -150,11 +150,11 @@ jobs:
pattern: python-wheels-*
merge-multiple: true

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# password: ${{ secrets.MOORDYN_TESTPYPI_API }}
# repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.MOORDYN_PYPI_API }}
repository-url: https://upload.pypi.org/legacy/
skip-existing: true
# - name: Publish package to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# # password: ${{ secrets.MOORDYN_TESTPYPI_API }}
# # repository-url: https://test.pypi.org/legacy/
# password: ${{ secrets.MOORDYN_PYPI_API }}
# repository-url: https://upload.pypi.org/legacy/
# skip-existing: true
34 changes: 26 additions & 8 deletions wrappers/python/wheels.github/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,29 @@ def arefiles(files):
extra_compile_args=extra_compile_args,
)

setup(
packages=find_packages(include=['moordyn', 'moordyn.*']),
ext_modules=[cmoordyn],
package_data={"source": ["*.hpp", "*.h"],
"source.Util": ["*.hpp", "*.h"],
"source.Waves": ["*.hpp", "*.h"],
${EIGEN_PACKAGE_DATA}}
)
if platform.python_implementation() == 'PyPy':
from setuptools.command.build_ext import build_ext
class build_ext_for_pypy(build_ext):
def build_extensions(self):
self.compiler.linker_so = ["cc", "-shared"]
self.compiler.linker_exe = ["cc", "-shared"]
super().build_extensions()

setup(
packages=find_packages(include=['moordyn', 'moordyn.*']),
ext_modules=[cmoordyn],
package_data={"source": ["*.hpp", "*.h"],
"source.Util": ["*.hpp", "*.h"],
"source.Waves": ["*.hpp", "*.h"],
${EIGEN_PACKAGE_DATA}},
cmdclass = {'build_ext': build_ext_for_pypy}
)
else:
setup(
packages=find_packages(include=['moordyn', 'moordyn.*']),
ext_modules=[cmoordyn],
package_data={"source": ["*.hpp", "*.h"],
"source.Util": ["*.hpp", "*.h"],
"source.Waves": ["*.hpp", "*.h"],
${EIGEN_PACKAGE_DATA}}
)

0 comments on commit 165f5cc

Please sign in to comment.