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..47130841 --- /dev/null +++ b/.github/workflows/conda-package.yml @@ -0,0 +1,16 @@ +name: Conda Package + +on: [pull_request] + +jobs: + publish: + runs-on: Ubuntu-20.04 + steps: + - uses: actions/checkout@v1 + - name: publish-to-conda + uses: MichaelsJP/conda-package-publish-action@v1.0.0 + with: + subDir: 'conda.recipe' + AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} + platforms: 'all' + override: true \ No newline at end of file diff --git a/README.rst b/README.rst index b14fbf19..90939c7b 100644 --- a/README.rst +++ b/README.rst @@ -14,8 +14,12 @@ :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://github.com/GIScience/openrouteservice-py/workflows/Conda%20Package/badge.svg?branch=master + :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 .. image:: https://mybinder.org/badge_logo.svg 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..e937f65c --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,43 @@ +{% set name = "openrouteservice" %} +{% 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 }}" + + +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