From 86c2bae1615087f8878e833bf3ed45dd463161d9 Mon Sep 17 00:00:00 2001 From: Paola Petrelli Date: Tue, 1 Mar 2022 11:25:07 +1100 Subject: [PATCH] fixed setup and conda files --- conda/.condarc | 2 -- conda/bld.bat | 2 -- conda/build.sh | 1 - conda/{meta.yml => meta.yaml} | 13 +++++++++---- conda/run_test.sh | 2 -- conda/run_test_coverage.sh | 3 --- setup.cfg | 11 +---------- setup.py | 2 +- 8 files changed, 11 insertions(+), 25 deletions(-) delete mode 100644 conda/.condarc delete mode 100644 conda/bld.bat delete mode 100644 conda/build.sh rename conda/{meta.yml => meta.yaml} (82%) delete mode 100755 conda/run_test.sh delete mode 100755 conda/run_test_coverage.sh diff --git a/conda/.condarc b/conda/.condarc deleted file mode 100644 index 5433994..0000000 --- a/conda/.condarc +++ /dev/null @@ -1,2 +0,0 @@ -conda config --add channels -conda install mypackage diff --git a/conda/bld.bat b/conda/bld.bat deleted file mode 100644 index c40a9bb..0000000 --- a/conda/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 diff --git a/conda/build.sh b/conda/build.sh deleted file mode 100644 index a40f109..0000000 --- a/conda/build.sh +++ /dev/null @@ -1 +0,0 @@ -$PYTHON setup.py install # Python command to install the script. diff --git a/conda/meta.yml b/conda/meta.yaml similarity index 82% rename from conda/meta.yml rename to conda/meta.yaml index adfbaf7..b0cb361 100644 --- a/conda/meta.yml +++ b/conda/meta.yaml @@ -6,7 +6,7 @@ package: about: home: https://github.com/coecms/xmhw license: Apache-2.0 - license_file: LICENSE-2.0.txt + license_file: LICENSE.txt summary: "Xarray based Marine HeatWave detection code" description: | XMHW identifies marine heatwaves from a timseries of @@ -18,10 +18,11 @@ about: requirements: host: - - python >= 3.7 + - python >=3.7 - pip + - pbr run: - - python >= 3.7 + - python >=3.7 - pandas - xarray - numpy @@ -31,14 +32,16 @@ source: url: https://github.com/coecms/xmhw/archive/refs/tags/{{version}}.tar.gz build: + script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed" + noarch: python number: {{ GIT_DESCRIBE_NUMBER }} - script: python setup.py install --single-version-externally-managed --record=record.txt test: source_files: - setup.cfg - test requires: + - netcdf4 - pytest - coverage - numpy @@ -47,6 +50,8 @@ test: - dask imports: - xmhw + script_env: + - TEST_OUTPUT commands: - COVERAGE_FILE=${TEST_OUTPUT:-.}/coverage coverage run --source xmhw -m pytest ./test diff --git a/conda/run_test.sh b/conda/run_test.sh deleted file mode 100755 index 21da92a..0000000 --- a/conda/run_test.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -py.test diff --git a/conda/run_test_coverage.sh b/conda/run_test_coverage.sh deleted file mode 100755 index dece376..0000000 --- a/conda/run_test_coverage.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -pip install coverage pytest-cov -py.test --cov=xmhw --cov-report xml:/tmp/artefacts/tests/pytest/coverage.xml --junit-xml /tmp/artefacts/tests/pytest/results.xml diff --git a/setup.cfg b/setup.cfg index ee5d9ea..eba511d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,7 @@ [metadata] name = xmhw url = https://github.com/coecms/xmhw +version = 0.8.0 author = Paola Petrelli author_email = paola.petrelli@utas.edu.au summary = 'Marine heatwave detection code using xarray' @@ -18,16 +19,6 @@ classifier = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 -[options] -install_requires = - xarray - numpy - pandas - dask -tests_require = - netCDF4 - -python_requires = >= 3.7 [files] packages = diff --git a/setup.py b/setup.py index 95f3c46..52f1ab9 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup( - setup_requires=['pbr>=1.9', 'setuptools>=17.1'], + setup_requires=['pbr', 'setuptools'], pbr=True, )