From ec1dd8c9c6d04aa8faabf8e358d30b8609681236 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 14:49:12 +0100 Subject: [PATCH 01/10] add conda build --- .condarc | 4 +++ .github/workflows/conda-package.yml | 15 ++++++++++ conda.recipe/bld.bat | 3 ++ conda.recipe/build.sh | 2 ++ conda.recipe/meta.yaml | 43 +++++++++++++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 .condarc create mode 100644 .github/workflows/conda-package.yml create mode 100644 conda.recipe/bld.bat create mode 100644 conda.recipe/build.sh create mode 100644 conda.recipe/meta.yaml diff --git a/.condarc b/.condarc new file mode 100644 index 00000000..b2344324 --- /dev/null +++ b/.condarc @@ -0,0 +1,4 @@ +channels: + - michaelsjp + +show_channel_urls: True \ No newline at end of file diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml new file mode 100644 index 00000000..1a8d586a --- /dev/null +++ b/.github/workflows/conda-package.yml @@ -0,0 +1,15 @@ +name: Conda Package + +on: [push, pull_request] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: publish-to-conda + uses: fcakyon/conda-publish-action@v1.3 + with: + subdir: '.' + anacondatoken: ${{ secrets.ANACONDA_TOKEN }} + platforms: 'win osx linux' diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat new file mode 100644 index 00000000..447706ab --- /dev/null +++ b/conda.recipe/bld.bat @@ -0,0 +1,3 @@ +cd %RECIPE_DIR%\.. +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh new file mode 100644 index 00000000..aa59b4dc --- /dev/null +++ b/conda.recipe/build.sh @@ -0,0 +1,2 @@ +cd $RECIPE_DIR/.. +$PYTHON setup.py install \ No newline at end of file diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 00000000..9d868d19 --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,43 @@ +{% set name = "openrouteservice" %} +{% set version = "2.3.0" %} + +package: + name: "{{ name|lower }}" + version: "{{ version }}" + +source: + git_url: https://github.com/GIScience/openrouteservice-py.git + git_rev: "v{{ version }}" + + +requirements: + build: + - python>=3.4 + - pip + - requests>=2.0 + - nose>=1.0 + - responses>=0.10 + - coveralls>=1.7.0 + - coverage>=4.5.0 + run: + - requests>=2.0 +test: + imports: + - openrouteservice + source_files: + - openrouteservice + - test + requires: + - nose>1.0 + - requests>=2.0 + - responses>=0.10 + - coveralls>=1.7.0 + - coverage>=4.5.0 + commands: + - nosetests -v + +about: + home: https://github.com/GIScience/openrouteservice-py + license: Apache + license_family: BSD + license_file: LICENSE \ No newline at end of file From bea4653c0562c39f16a5a5f4c26bf211d383c2bc Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 14:51:58 +0100 Subject: [PATCH 02/10] chagne subdir --- .github/workflows/conda-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 1a8d586a..75b20eb6 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -10,6 +10,6 @@ jobs: - name: publish-to-conda uses: fcakyon/conda-publish-action@v1.3 with: - subdir: '.' + subdir: 'conda.recipe' anacondatoken: ${{ secrets.ANACONDA_TOKEN }} platforms: 'win osx linux' From 05ec86a0410ad1a358c8b543b4ac18dbc02f2f10 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:00:01 +0100 Subject: [PATCH 03/10] change source to itself --- conda.recipe/meta.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 9d868d19..4106be44 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,13 +1,12 @@ {% set name = "openrouteservice" %} -{% set version = "2.3.0" %} +{% set version = "2.3.2" %} package: name: "{{ name|lower }}" version: "{{ version }}" source: - git_url: https://github.com/GIScience/openrouteservice-py.git - git_rev: "v{{ version }}" + git_url: ../ requirements: From 45051ffdcfb34edd958fc2297af3649d8e36cfc3 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:06:17 +0100 Subject: [PATCH 04/10] re-add git url --- conda.recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 4106be44..9d868d19 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,12 +1,13 @@ {% set name = "openrouteservice" %} -{% set version = "2.3.2" %} +{% set version = "2.3.0" %} package: name: "{{ name|lower }}" version: "{{ version }}" source: - git_url: ../ + git_url: https://github.com/GIScience/openrouteservice-py.git + git_rev: "v{{ version }}" requirements: From 90b8e256d49bdcc90ba9dc2dd38eb9567cd2dc46 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:09:51 +0100 Subject: [PATCH 05/10] add git install --- .github/workflows/conda-package.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 75b20eb6..e446fc46 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -7,6 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install git - name: publish-to-conda uses: fcakyon/conda-publish-action@v1.3 with: From 1ec33f4b64745dced089b769553f7654154e9340 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:16:16 +0100 Subject: [PATCH 06/10] test another version --- .github/workflows/conda-package.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index e446fc46..85d77846 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -1,19 +1,14 @@ name: Conda Package -on: [push, pull_request] +on: [pull_request] jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install git + - uses: actions/checkout@v1 - name: publish-to-conda - uses: fcakyon/conda-publish-action@v1.3 + uses: maxibor/conda-package-publish-action@v1.1 with: - subdir: 'conda.recipe' - anacondatoken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'win osx linux' + subDir: 'conda.recipe' + AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} From 4991899a51c25b2ef5540e0f8ad0272f41b6cc5c Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:17:32 +0100 Subject: [PATCH 07/10] user master version --- .github/workflows/conda-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 85d77846..4071f9a3 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: maxibor/conda-package-publish-action@v1.1 + uses: maxibor/conda-package-publish-action@master with: subDir: 'conda.recipe' AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} From e2d206c1326cc866313d1d51d0fc39d356f717e2 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:24:10 +0100 Subject: [PATCH 08/10] correct conda badge --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b14fbf19..e48aa77e 100644 --- a/README.rst +++ b/README.rst @@ -14,8 +14,8 @@ :target: https://badge.fury.io/py/openrouteservice :alt: PyPI version -.. image:: https://anaconda.org/nilsnolde/openrouteservice/badges/installer/conda.svg - :target: https://conda.anaconda.org/nilsnolde/openrouteservice +.. image:: https://anaconda.org/michaelsjp/openrouteservice/badges/installer/conda.svg + :target: https://anaconda.org/MichaelsJP/openrouteservice :alt: Conda install .. image:: https://mybinder.org/badge_logo.svg From 4369929313bf178c4dc2337808ef3d76f9daa137 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:32:25 +0100 Subject: [PATCH 09/10] add badge for conda version --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index e48aa77e..380cd102 100644 --- a/README.rst +++ b/README.rst @@ -14,6 +14,10 @@ :target: https://badge.fury.io/py/openrouteservice :alt: PyPI version +.. image:: https://github.com/GIScience/openrouteservice-py/workflows/Conda%20Package/badge.svg + :target: https://anaconda.org/MichaelsJP/openrouteservice + :alt: Conda Build + .. image:: https://anaconda.org/michaelsjp/openrouteservice/badges/installer/conda.svg :target: https://anaconda.org/MichaelsJP/openrouteservice :alt: Conda install From e0c5054b0e121b6576d34793689dd8ee0f0cc6f5 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 16:02:37 +0100 Subject: [PATCH 10/10] give another package a try --- .github/workflows/conda-package.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 4071f9a3..6fe96312 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -8,7 +8,8 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: maxibor/conda-package-publish-action@master + uses: fcakyon/conda-publish-action@master with: - subDir: 'conda.recipe' - AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} + subdir: 'conda.recipe' + anacondatoken: ${{ secrets.ANACONDA_TOKEN }} + platforms: 'win osx linux' \ No newline at end of file