From 4dd74591fc3d40edb2299ff4e7c9307cdaa20063 Mon Sep 17 00:00:00 2001 From: L-Nafaryus Date: Wed, 11 Aug 2021 01:39:44 +0500 Subject: [PATCH] Mod: additional info for setup --- .gitignore | 1 + anisotropy.py | 9 --------- requirements.txt | 1 + setup.py | 31 ++++++++++++++++++++++++++++--- 4 files changed, 30 insertions(+), 12 deletions(-) delete mode 100644 anisotropy.py diff --git a/.gitignore b/.gitignore index 04c8b82..ca3024d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ env/ *.toc *.png *.out +*.egg-info diff --git a/anisotropy.py b/anisotropy.py deleted file mode 100644 index 67b6823..0000000 --- a/anisotropy.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# This file is part of anisotropy. -# License: GNU GPL version 3, see the file "LICENSE" for details. - -import sys -import anisotropy - -sys.exit(anisotropy.main()) diff --git a/requirements.txt b/requirements.txt index 62febc4..f66f4fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ peewee pandas Sphinx sphinx-rtd-theme +Click diff --git a/setup.py b/setup.py index 1fe538b..e24761c 100644 --- a/setup.py +++ b/setup.py @@ -7,23 +7,40 @@ from setuptools import setup import anisotropy +def read(filename, split = False): + content = "" + + with open(os.path.join(os.path.dirname(__file__), filename), "r") as io: + content = io.read() + + return content.strip().split("\n") if split else content + + def main(): setup( name = "anisotropy", description = "Anisotropy", - long_description = anisotropy.__doc__, + long_description = read("README.rst"), + long_description_content_type = "text/x-rst", version = anisotropy.__version__, author = anisotropy.__author__, author_email = anisotropy.__email__, license = anisotropy.__license__, + url = "https://github.com/L-Nafaryus/anisotropy", - keywords = "anisotropy console", + project_urls = { + "Source": "https://github.com/L-Nafaryus/anisotropy" + }, + + keywords = "anisotropy console CFD", classifiers = [ "Environment :: Console", "Operating System :: POSIX", "Operating System :: Unix", + "Intended Audience :: Science/Research", "Programming Language :: Python :: 3.9" ], + package_data = { "anisotropy": [ "config/default.toml" @@ -36,7 +53,15 @@ def main(): "anisotropy.openfoam", "anisotropy.salomepl", "anisotropy.samples" - ) + ), + + python_requires = ">=3.6", + install_requires = read("requirements.txt", True), + entry_points = { + "console_scripts": [ + "anisotropy=anisotropy.core.cli:anisotropy" + ] + } )