From 70e6d709881e7cf7249d3ef64aba96c9cc58ff8b Mon Sep 17 00:00:00 2001 From: Thomas Ferreira de Lima Date: Tue, 2 Apr 2019 19:46:40 -0400 Subject: [PATCH 1/5] pymod deployment to pypi through travis --- .travis.yml | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 81e8318ec..230d3b945 100644 --- a/.travis.yml +++ b/.travis.yml @@ -578,4 +578,13 @@ script: fi after_success: + # upload to dropbox + # need DROPBOX_OAUTH_BEARER environment variable - dropbox-deployment + + # uploading to pypi using twine + # need TWINE_USERNAME, TWINE_PASSWORD and TWINE_REPOSITORY_URL env variable + - if [ "$PYTHON_BUILD" = true ] || [ "$DOCKER_BUILD" = true ]; then + pip install -U twine; + twine upload --skip-existing deploy/dist-pymod/$klayout_version/*; + fi diff --git a/setup.py b/setup.py index df4c6a573..4c01802fa 100644 --- a/setup.py +++ b/setup.py @@ -322,7 +322,7 @@ class Config(object): """ Gets the version string """ - return "0.26.0.dev13" + return "0.26.0.dev14" config = Config() From 32c07759fc3f6e2ac28ee5b25063aa091165ab03 Mon Sep 17 00:00:00 2001 From: Thomas Ferreira de Lima Date: Tue, 2 Apr 2019 20:10:23 -0400 Subject: [PATCH 2/5] (sudo) pip install -U twine --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 230d3b945..40201f5e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -585,6 +585,6 @@ after_success: # uploading to pypi using twine # need TWINE_USERNAME, TWINE_PASSWORD and TWINE_REPOSITORY_URL env variable - if [ "$PYTHON_BUILD" = true ] || [ "$DOCKER_BUILD" = true ]; then - pip install -U twine; + pip install -U twine || sudo pip install -U twine; twine upload --skip-existing deploy/dist-pymod/$klayout_version/*; fi From c5ea287158483f66b1ea64db9fdb354b4de33d94 Mon Sep 17 00:00:00 2001 From: Thomas Ferreira de Lima Date: Tue, 2 Apr 2019 22:39:12 -0400 Subject: [PATCH 3/5] Stripping shared object for linux pymod --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 4c01802fa..9b13b54b9 100644 --- a/setup.py +++ b/setup.py @@ -310,6 +310,10 @@ class Config(object): else: loader_path = '$ORIGIN/..' args += ['-Wl,-rpath,' + loader_path] + # default linux shared object compilation uses the '-g' flag, + # which generates unnecessary debug information + # removing with strip-all during the linking stage + args += ['-Wl,--strip-all'] return args def macros(self): From d5031b09e406441b68f6a27281135649ca52a4bb Mon Sep 17 00:00:00 2001 From: Thomas Ferreira de Lima Date: Tue, 2 Apr 2019 23:08:37 -0400 Subject: [PATCH 4/5] Uploading windows wheels to pypi via Azure --- azure-pipelines.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 28804a941..e35efce39 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -101,7 +101,7 @@ jobs: artifactName: 'wheel-$(python.version).$(python.architecture)' - job: 'Deploy' - displayName: 'Combine Windows wheels' + displayName: 'Combine Windows wheels and deploy to PyPI' dependsOn: Build pool: vmImage: 'vs2017-win2016' # other options: 'macOS-10.13', 'ubuntu-16.04' @@ -149,4 +149,12 @@ jobs: inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'windows_wheels' + - bash: | + pip install -U twine + twine upload --skip-existing $BUILD_ARTIFACTSTAGINGDIRECTORY/* + env: + TWINE_USERNAME: $(TWINE_USERNAME) + TWINE_PASSWORD: $(TWINE_PASSWORD) + TWINE_REPOSITORY_URL: $(TWINE_REPOSITORY_URL) + displayName: 'Uploading to PyPI'