Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 2a89a47

Browse files
committed
fix python versioning
Signed-off-by: pSchlarb <[email protected]>
1 parent a1095be commit 2a89a47

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

.github/workflows/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,8 @@ jobs:
933933
run: |
934934
docker run --rm -i -v $PWD:/root/indy-sdk --name libindy $DOCKER_IMG_NAME_PYTHON \
935935
bash -c '(cd $HOME/indy-sdk/wrappers/python && \
936-
PACKAGE_VERSION=${{ env.PUBLISH_VERSION }} python3.6 setup.py sdist && \
936+
echo "${{ env.PUBLISH_VERSION }}">> version.txt &&\
937+
python3.6 setup.py sdist && \
937938
python3.6 -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_PYTHON3_INDY }})'
938939
939940
####################################################

Jenkinsfile.cd

+2-2
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ def pythonWrapperPublishing(testEnv, isRelease, directory, base_library) {
11381138
testEnv.inside {
11391139
withCredentials([file(credentialsId: 'pypi_credentials', variable: 'credentialsFile')]) {
11401140
sh 'cp $credentialsFile ./'
1141-
1142-
sh "PACKAGE_VERSION=$version$suffix python3 setup.py sdist"
1141+
sh "echo $version$suffix > version.txt"
1142+
sh "python3 setup.py sdist"
11431143
sh "python3 -m twine upload dist/* --config-file .pypirc"
11441144

11451145
}

wrappers/python/MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include version.txt

wrappers/python/setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from distutils.core import setup
22
import os
33

4-
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.16.0'
4+
with open(os.path.join(os.path.dirname(__file__), 'version.txt'), 'r') as file:
5+
PKG_VERSION = file.read().rstrip()
56

67
TEST_DEPS = [
78
'pytest<3.7', 'pytest-asyncio==0.10.0', 'base58'
@@ -20,5 +21,6 @@
2021
tests_require=TEST_DEPS,
2122
extras_require={
2223
'test': TEST_DEPS
23-
}
24+
},
25+
include_package_data=True
2426
)

wrappers/python/version.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.16.0

0 commit comments

Comments
 (0)