Skip to content

Commit

Permalink
Merge pull request #67 from charlesneimog/develop
Browse files Browse the repository at this point in the history
Fix packages/conda definition using py4pd.cfg
  • Loading branch information
charlesneimog authored Nov 26, 2023
2 parents eebf032 + 3092009 commit c424549
Show file tree
Hide file tree
Showing 35 changed files with 3,779 additions and 3,925 deletions.
252 changes: 121 additions & 131 deletions .github/workflows/Builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ name: Builder
on:
push:
branches:
- develop
- develop
paths:
- '**/*.c'
- '**/*.h'
- '**/*.yml'
- "**/*.c"
- "**/*.h"
- "**/*.yml"

workflow_dispatch:
inputs:
windows:
description: 'Build for Windows'
description: "Build for Windows"
required: false
type: boolean
default: false
macos-intel:
description: 'Build for Mac Intel'
description: "Build for Mac Intel"
required: false
type: boolean
default: false
macos-arm:
description: 'Build for Mac ARM'
description: "Build for Mac ARM"
required: false
type: boolean
default: false
linux:
description: 'Build for Linux'
description: "Build for Linux"
required: false
type: boolean
default: true

jobs:
jobs:
# ==============================================================================
# = WINDOWS =
# ==============================================================================
Expand All @@ -41,58 +41,57 @@ jobs:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- if: runner.os == 'Windows'
name: "Install mingw deps"
uses: msys2/setup-msys2@v2
with:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- if: runner.os == 'Windows'
name: "Install mingw deps"
uses: msys2/setup-msys2@v2
with:
install: make autoconf automake libtool mingw-w64-x86_64-gcc libtool mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-dlfcn mingw-w64-x86_64-grep mingw-w64-x86_64-curl unzip
update: false

- if: runner.os == 'Windows'
name: Get Pd
shell: msys2 {0}
run: |
curl -L -o pure-data.zip http://msp.ucsd.edu/Software/pd-0.54-0.msw.zip
unzip pure-data.zip
rm pure-data.zip
rename pd-0.54-0 pd pd-0.54-0
- name: Configure Environment
run: |
mkdir py4pd
python -m pip install numpy
python -c "import sysconfig; f = open('pythonincludes.txt', 'w'); print(sysconfig.get_paths()['include'].replace('\\', '/'), file=f); f.close()"
python -c "import os; import sys; f = open('pythonpath.txt', 'w'); print(os.path.dirname(sys.executable).replace('\\', '/'), file=f); f.close()"
python -c "import os; import sys; import numpy.distutils.misc_util as np_utils; f = open('numpyincludes.txt', 'w'); print(np_utils.get_numpy_include_dirs()[0].replace('\\', '/'), file=f); f.close()"
- if: runner.os == 'Windows'
name: Build py4pd
shell: msys2 {0}
run: |
make PYTHON_VERSION=python3.11 PDDIR=./pd extension=m_amd64
- name: Copy Files and Set for Tests
run: |
$pythonpath = Get-Content pythonpath.txt
Copy-Item -Path "$pythonpath\python311.dll" -Destination py4pd\ -Recurse
Copy-Item -Path "$pythonpath\python3.dll" -Destination py4pd\ -Recurse
cp py4pd.m_amd64 py4pd\
- name: Upload Object ZIP
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd
- if: runner.os == 'Windows'
name: Get Pd
shell: msys2 {0}
run: |
curl -L -o pure-data.zip http://msp.ucsd.edu/Software/pd-0.54-0.msw.zip
unzip pure-data.zip
rm pure-data.zip
rename pd-0.54-0 pd pd-0.54-0
- name: Configure Environment
run: |
mkdir py4pd
python -m pip install numpy
python -c "import sysconfig; f = open('pythonincludes.txt', 'w'); print(sysconfig.get_paths()['include'].replace('\\', '/'), file=f); f.close()"
python -c "import os; import sys; f = open('pythonpath.txt', 'w'); print(os.path.dirname(sys.executable).replace('\\', '/'), file=f); f.close()"
python -c "import os; import sys; import numpy.distutils.misc_util as np_utils; f = open('numpyincludes.txt', 'w'); print(np_utils.get_numpy_include_dirs()[0].replace('\\', '/'), file=f); f.close()"
- if: runner.os == 'Windows'
name: Build py4pd
shell: msys2 {0}
run: |
make PYTHON_VERSION=python3.11 PDDIR=./pd extension=m_amd64
- name: Copy Files and Set for Tests
run: |
$pythonpath = Get-Content pythonpath.txt
Copy-Item -Path "$pythonpath\python311.dll" -Destination py4pd\ -Recurse
Copy-Item -Path "$pythonpath\python3.dll" -Destination py4pd\ -Recurse
cp py4pd.m_amd64 py4pd\
- name: Upload Object ZIP
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd

# ==============================================================================
# = MAC INTEL =
Expand All @@ -102,44 +101,42 @@ jobs:
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0


- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: set Enviroment
run: |
brew install --cask pd
python3.11 -c 'import sysconfig;print(sysconfig.get_config_var("LINKFORSHARED"))'
python3.11 -m pip install numpy
mkdir py4pd
- name: Build
run: make PYTHON_VERSION=python3.11 extension=d_amd64

- name: Copy files to py4pd
run: |
cp py4pd.d_amd64 py4pd
cp py4pd.d_amd64 test
- name: Simples Tests
continue-on-error: true
run: |
cd test
python3.11 -m pip install numba numpy -t ./py-modules/
python3.11 ./runTests.py
- name: Upload Object
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: set Enviroment
run: |
brew install --cask pd
python3.11 -c 'import sysconfig;print(sysconfig.get_config_var("LINKFORSHARED"))'
python3.11 -m pip install numpy
mkdir py4pd
- name: Build
run: make PYTHON_VERSION=python3.11 extension=d_amd64

- name: Copy files to py4pd
run: |
cp py4pd.d_amd64 py4pd
cp py4pd.d_amd64 test
- name: Simples Tests
continue-on-error: true
run: |
cd test
python3.11 -m pip install numba numpy -t ./py-modules/
python3.11 ./runTests.py
- name: Upload Object
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd

# ==============================================================================
# = MAC ARM =
Expand All @@ -150,35 +147,34 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: set Enviroment
run: |
brew install --cask pd
python3.11 -c 'import sysconfig;print(sysconfig.get_config_var("LINKFORSHARED"))'
python3.11 -m pip install numpy
mkdir py4pd
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Build
run: make PYTHON_VERSION=python3.11 extension=d_arm64
- name: set Enviroment
run: |
brew install --cask pd
python3.11 -c 'import sysconfig;print(sysconfig.get_config_var("LINKFORSHARED"))'
python3.11 -m pip install numpy
mkdir py4pd
- name: Copy files to py4pd
run: |
cp py4pd.d_arm64 py4pd
- name: Build
run: make PYTHON_VERSION=python3.11 extension=d_arm64

- name: Upload Object
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd
- name: Copy files to py4pd
run: |
cp py4pd.d_arm64 py4pd
- name: Upload Object
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd

# ==============================================================================
# = LINUX =
Expand All @@ -195,8 +191,8 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: "3.11"

- name: print github.event.inputs.linux
run: |
echo ${{ github.event.inputs.linux }}
Expand All @@ -221,16 +217,16 @@ jobs:
sudo apt-get install puredata -y
- name: Build
run: make PDINCLUDEDIR=./pure-data/src/ PYTHON_VERSION=python3.11 extension=l_amd64
run: make PDINCLUDEDIR=./pure-data/src/ PYTHON_VERSION=python3.11 extension=l_amd64

- name: Copy files to py4pd
run: |
mkdir py4pd
cp py4pd.l_amd64 resources/py4pd.cfg resources/py.py resources/py4pd-help.pd py4pd
cp -r resources py4pd
cp -r src py4pd
find py4pd/src -name "*.o" -type f -delete
cp resources/README.deken.pd py4pd
cp resources/README.deken.pd py4pd
- name: Tests
continue-on-error: true
Expand All @@ -239,15 +235,9 @@ jobs:
cd test
python3.11 -m pip install numba numpy -t ./py-modules/
python ./runTests.py
- name: Upload Object
uses: actions/upload-artifact@v3
with:
name: py4pd
path: py4pd






1 change: 0 additions & 1 deletion py4pd-help.pd
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
#X obj 13 117 py4pd;
#N canvas 538 32 988 300 MAINFUNCTIONS 0;
#X restore 74 160 pd MAINFUNCTIONS;
#X obj 17 17;
#X text 292 160 IMPORTANT: This is just simple example \, the exaustive Docs are avaible in www.charlesneimog.github.io/py4pd;
#X connect 0 0 27 0;
#X connect 6 0 27 0;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c424549

Please sign in to comment.