From a07f368047e8bb22ebe8988beacb08ba824cc4ea Mon Sep 17 00:00:00 2001 From: Guille Date: Mon, 17 Jul 2023 11:24:12 -0400 Subject: [PATCH] Create wheel package --- costs/data/.gitignore | 4 ---- costs/outputs/.gitignore | 4 ---- costs/tmp/.gitignore | 4 ---- costs/version.py | 4 ++++ pyptoject.toml | 0 resources.txt => requirements.txt | 0 setup.py | 36 +++++++++++++++++++++++++++++++ 7 files changed, 40 insertions(+), 12 deletions(-) delete mode 100644 costs/data/.gitignore delete mode 100644 costs/outputs/.gitignore delete mode 100644 costs/tmp/.gitignore create mode 100644 costs/version.py create mode 100644 pyptoject.toml rename resources.txt => requirements.txt (100%) create mode 100644 setup.py diff --git a/costs/data/.gitignore b/costs/data/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/costs/data/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/costs/outputs/.gitignore b/costs/outputs/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/costs/outputs/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/costs/tmp/.gitignore b/costs/tmp/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/costs/tmp/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/costs/version.py b/costs/version.py new file mode 100644 index 0000000..04b8b73 --- /dev/null +++ b/costs/version.py @@ -0,0 +1,4 @@ +""" +Cost version number +""" +__version__ = '0.1.0.0' diff --git a/pyptoject.toml b/pyptoject.toml new file mode 100644 index 0000000..e69de29 diff --git a/resources.txt b/requirements.txt similarity index 100% rename from resources.txt rename to requirements.txt diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..93e5514 --- /dev/null +++ b/setup.py @@ -0,0 +1,36 @@ +import glob +import pathlib +from distutils.util import convert_path +from setuptools import setup + +with pathlib.Path('requirements.txt').open() as r: + install_requires = [ + str(requirement).replace('\n', '') + for requirement + in r.readlines() + ] +install_requires.append('setuptools') + +main_ns = {} +version = convert_path('costs/version.py') +with open(version) as f: + exec(f.read(), main_ns) + +setup( + name='cerc-costs', + version=main_ns['__version__'], + description="CERC costs contains the basic cost calculation per CERC-Hub building", + long_description="CERC costs contains the basic cost calculation per CERC-Hub building", + classifiers=[ + "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ], + include_package_data=True, + packages=['costs'], + setup_requires=install_requires, + install_requires=install_requires, + data_files=[ + ('costs', glob.glob('requirements.txt')) + ] +)