From 86af0f4e0a61e4acc5848166ff6778a1872d7e40 Mon Sep 17 00:00:00 2001 From: David Bickel Date: Tue, 26 Nov 2024 10:09:01 +0100 Subject: [PATCH] Enable installation with setuptools --- Makefile | 11 ++++++++++- environment.yml | 13 ++++++------- pyproject.toml | 36 ++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 4 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 pyproject.toml diff --git a/Makefile b/Makefile index 861edd5..eb38c0a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,16 @@ +PACKAGE_NAME = entry_cli + +.PHONY: init install uninstall test + init: conda env create -f environment.yml +install: + pip install --upgrade pip setuptools + pip install -e . + test: nosetests tests -.PHONY: init test +uninstall: + pip uninstall -y $(PACKAGE_NAME) diff --git a/environment.yml b/environment.yml index 9fcd9d9..82ec9dc 100644 --- a/environment.yml +++ b/environment.yml @@ -1,11 +1,10 @@ name: entry-cli-env channels: - - rdkit - - conda-forge - defaults dependencies: -- python -- numpy -- nose -- openbabel=3.1.1 -- rdkit=2019.03.4.0 + - python=3.7 + - numpy + - nose + - conda-forge::openbabel=3.1.1 + - rdkit::rdkit=2019.03.4.0 + - setuptools diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9e6b2ad --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "entry-cli" +description = "Command line app for predicting bacterial accumulation." +dynamic = ["version"] +readme = {file = "README.md", content-type = "text/markdown"} +license = {file = "LICENSE"} +authors = [ + {name = "Bryon Drown"}, + {name = "swansonk14", email = "swansonk.14@gmail.com"}, + {name = "Andrew Wilkinson"} +] +requires-python = ">= 3" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", +] +keywords = [] + +[project.urls] +Repository = "https://github.com/HergenrotherLab/entry-cli" + +[project.scripts] +entry-cli = "entry_cli.calc_props:main" + +[tool.setuptools] +packages = ["entry_cli"] + +[tool.setuptools.dynamic] +version = {attr = "entry_cli.__version__"} diff --git a/requirements.txt b/requirements.txt index b74fb3e..b8e86d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ nose numpy openbabel=3.1.1 rdkit=2019.03.4.0 +setuptools