Skip to content

Commit

Permalink
Try to fix python version upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Mar 9, 2021
1 parent 655d6dd commit 42cb26e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ OSSIA/ossia-node/node_modules
3rdparty/*sdk*
3rdparty/CicmWrapper/
3rdparty/pure-data/
build
build*

45 changes: 17 additions & 28 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,8 @@ case "$TRAVIS_OS_NAME" in
# _version.py is not valid in a non-git folder
# When making a wheel, we write the git tag which it has been build from
# request the version
WHEEL_TAG_VERSION=$(echo -e "import sys\nsys.path.append('${TRAVIS_BUILD_DIR}/src/ossia-python/')\nfrom pyossia._version import get_versions\nget_versions()['version']" | ${PYTHON_BIN})
echo "#! /usr/bin/env python
# -*- coding: utf-8 -*-
export WHEEL_TAG_VERSION=$(echo -e "import sys\nsys.path.append('${TRAVIS_BUILD_DIR}/src/ossia-python/')\nfrom pyossia._version import get_versions\nget_versions()['version']" | ${PYTHON_BIN})

def get_versions():
return {'version':'${WHEEL_TAG_VERSION}'}" > ${TRAVIS_BUILD_DIR}/src/ossia-python/pyossia/_version.py
$CMAKE_BIN -DCMAKE_TOOLCHAIN_FILE="$PWD/../cmake/toolchain/arm-linux-gnueabihf.cmake" \
-DPYTHON_INCLUDE_DIR=${RPI_ROOT_PATH}/usr/include/python${PYTHON_VERSION} \
-DCMAKE_BUILD_TYPE=Release \
Expand Down Expand Up @@ -310,14 +306,16 @@ def get_versions():
# _version.py is not valid in a non-git folder
# When making a wheel, we write the git tag which it has been build from
# request the version
WHEEL_TAG_VERSION=$(echo -e "import sys\nsys.path.append('${TRAVIS_BUILD_DIR}/src/ossia-python/')\nfrom pyossia._version import get_versions\nget_versions()['version']" | ${PYTHON_BIN})
echo "#! /usr/bin/env python
# -*- coding: utf-8 -*-
def get_versions():
return {'version':'${WHEEL_TAG_VERSION}'}" > ${TRAVIS_BUILD_DIR}/src/ossia-python/pyossia/_version.py

docker run --rm -v `pwd`:/ $DOCKER_IMAGE $PRE_CMD ci/build-wheels.sh
export WHEEL_TAG_VERSION=$(echo -e "import sys\nsys.path.append('${TRAVIS_BUILD_DIR}/src/ossia-python/')\nfrom pyossia._version import get_versions\nget_versions()['version']" | ${PYTHON_BIN})
echo "WHEEL_TAG_VERSION: $WHEEL_TAG_VERSION"
docker run --rm \
-v `pwd`:/ \
-e WHEEL_TAG_VERSION \
-e PyPiUser \
-e PyPiWord \
$DOCKER_IMAGE \
$PRE_CMD \
ci/build-wheels.sh

ls wheelhouse/
cp wheelhouse/*.whl ${ARTIFACTS_DIR}/
Expand All @@ -327,12 +325,8 @@ def get_versions():
# _version.py is not valid in a non-git folder
# When making a wheel, we write the git tag which it has been build from
# request the version
WHEEL_TAG_VERSION=$(echo -e "import sys\nsys.path.append('${TRAVIS_BUILD_DIR}/src/ossia-python/')\nfrom pyossia._version import get_versions\nget_versions()['version']" | ${PYTHON_BIN})
echo "#! /usr/bin/env python
# -*- coding: utf-8 -*-
def get_versions():
return {'version':'${WHEEL_TAG_VERSION}'}" > ${TRAVIS_BUILD_DIR}/src/ossia-python/pyossia/_version.py
export WHEEL_TAG_VERSION=$(echo -e "import sys\nsys.path.append('${TRAVIS_BUILD_DIR}/src/ossia-python/')\nfrom pyossia._version import get_versions\nget_versions()['version']" | ${PYTHON_BIN})
echo "WHEEL_TAG_VERSION: $WHEEL_TAG_VERSION"
$CMAKE_BIN -DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_BUILD_TYPE=Release \
Expand Down Expand Up @@ -522,19 +516,14 @@ def get_versions():
echo List TRAVIS_BUILD_DIR content
cd $TRAVIS_BUILD_DIR
ls

release_macos_folder "$TRAVIS_BUILD_DIR/ossia-max-package/ossia" "ossia-max-osx.zip" "io.ossia.ossia-max"

elif [[ "$BUILD_TYPE" == "python" ]]; then
# _version.py is not valid in a non-git folder
# When making a wheel, we write the git tag from which it has been build
PEP440_VERSION=$(echo $TRAVIS_TAG | sed s/^[^0-9]*//g)

echo "#! /usr/bin/env python
# -*- coding: utf-8 -*-
def get_versions():
return {'version':'${PEP440_VERSION}'}" > ${TRAVIS_BUILD_DIR}/src/ossia-python/pyossia/_version.py
export PEP440_VERSION=$(echo $TRAVIS_TAG | sed s/^[^0-9]*//g)
echo "PEP440_VERSION: $PEP440_VERSION"
$CMAKE_BIN -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
-DCMAKE_INSTALL_PREFIX="$TRAVIS_BUILD_DIR" \
Expand Down Expand Up @@ -571,7 +560,7 @@ def get_versions():
..
$CMAKE_BIN --build . -- -j2
$CMAKE_BIN --build . --target install

release_macos_folder "$TRAVIS_BUILD_DIR/ossia-qml/Ossia" "ossia-qml-osx.zip" "io.ossia.ossia-qml"

elif [[ "$BUILD_TYPE" == "ossia-cpp" ]]; then
Expand Down
6 changes: 6 additions & 0 deletions src/ossia-python/pyossia/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,12 @@ def get_versions():
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
# case we can only use expanded keywords.

if 'PEP440_VERSION' in os.environ:
return { 'version' : os.environ['PEP440_VERSION'] }

if 'WHEEL_TAG_VERSION' in os.environ:
return { 'version' : os.environ['WHEEL_TAG_VERSION'] }

cfg = get_config()
verbose = cfg.verbose

Expand Down
12 changes: 0 additions & 12 deletions src/ossia/dataflow/nodes/faust/faust_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,18 +418,6 @@ class custom_dsp_poly_effect : public dsp_poly {
{
fPolyDSP->progChange(channel, pgm);
}

/*
// Group API
void setGroup(bool group)
{
fPolyDSP->setGroup(group);
}
bool getGroup()
{
return fPolyDSP->getGroup();
}
*/
};

struct custom_dsp_poly_factory : public dsp_factory {
Expand Down

0 comments on commit 42cb26e

Please sign in to comment.