From 4446b2c25956e5b18b8f3c981fef4363f350cd6e Mon Sep 17 00:00:00 2001 From: Carson Sears Date: Fri, 16 Feb 2024 22:38:14 -0600 Subject: [PATCH] update build settings --- conda.recipe/meta.yaml | 15 ++++----- setup.cfg | 72 ------------------------------------------ setup.py | 6 ---- 3 files changed, 7 insertions(+), 86 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 3a93d94..360cbf3 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,8 +1,10 @@ -# load information from setup.cfg/setup.py -{% set data = load_setup_py_data() %} -{% set license = data.get('license') %} -{% set description = data.get('description') %} -{% set url = data.get('url') %} +# load information from pyproject.toml +{% set pyproject = load_file_data('pyproject.toml') %} +{% set project = pyproject.get('project', {}) %} +{% set license = project.get('license').get('text') %} +{% set description = project.get('description') %} +{% set project_url = pyproject.get('project', {}).get('urls') %} +{% set url = project_url.get('homepage') %} # this will get the version set by environment variable {% set version = environ.get('VERSION') %} {% set version_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} @@ -28,9 +30,6 @@ requirements: build: - setuptools - versioningit - - mantidworkbench - - qtpy - - pytest run: - python diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ef39fa4..0000000 --- a/setup.cfg +++ /dev/null @@ -1,72 +0,0 @@ -[metadata] -name = garnet -version = 0.0.1 -description = The Single Crystal Graphical Advanced Reduction Neutron Event Toolkit Project -long_description = file: README.md, LICENSE -long_description_content_type = text/markdown -url = https://github.com/neutrons/garnet - -[options] -package_dir= - =src -include_package_data = True -packages = find: -python_requires >= 3.10 -install_requires = - mantidworkbench - qtpy -tests_require = - flake8 - ruff - pytest - mock - -[options.entry_points] -console_scripts = - garnet = garnet.__main__:main - -[options.packages.find] -where = - src -exclude = - tests* - -[options.package_data] -* = - *.ui - *.txt - *.yml - *.yaml - *.qss - -[options.extras_require] -dev = - versioningit -tests = pytest - -[flake8] -max-line-length = 120 -ignore = E203 -exclude = conda.recipe/meta.yml - -[versioning] -source-version-file = garnet/_version.py -version-pattern = {tag} -commit-message-pattern = {raw} -tag-message-pattern = {raw} - -[coverage:run] -source = src/garnet -omit = - */tests/* - conda.recipe/* - docs/* - notebooks/* - src/garnet/__init__.py - src/garnet/_version.py - -[coverage:report] - # temp set low until project is more developed, default 60 -fail_under = 1 -exclude_lines = - if __name__ == "__main__": diff --git a/setup.py b/setup.py deleted file mode 100644 index 789e35d..0000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -# this file is necessary so conda can read the contents of setup.cfg using -# its load_setup_py_data function -from setuptools import setup -from versioningit import get_cmdclasses - -setup(cmdclass=get_cmdclasses())