From ee28c7cf4beb3ccef55dfb00e2b1a88f3c91f466 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 29 Dec 2020 01:35:13 +0100 Subject: [PATCH] Lowering requirements to Python 3.7. --- setup.py | 56 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/setup.py b/setup.py index d2b3f119a..faafa05bb 100644 --- a/setup.py +++ b/setup.py @@ -2,12 +2,12 @@ # vim: tabstop=2:shiftwidth=2:noexpandtab # kate: tab-width 2; replace-tabs off; indent-width 2; # ============================================================================= -# __ ___ _ ____ _ __ __ _ _ -# _ __ _ \ \ / / | | | _ \| | | \/ | ___ __| | ___| | -# | '_ \| | | \ \ / /| |_| | | | | | | |\/| |/ _ \ / _` |/ _ \ | -# | |_) | |_| |\ V / | _ | |_| | |___| | | | (_) | (_| | __/ | -# | .__/ \__, | \_/ |_| |_|____/|_____|_| |_|\___/ \__,_|\___|_| -# |_| |___/ +# __ ___ _ ____ _ __ __ _ _ +# _ __ _ \ \ / / | | | _ \| | | \/ | ___ __| | ___| | +# | '_ \| | | \ \ / /| |_| | | | | | | |\/| |/ _ \ / _` |/ _ \ | +# | |_) | |_| |\ V / | _ | |_| | |___| | | | (_) | (_| | __/ | +# | .__/ \__, | \_/ |_| |_|____/|_____|_| |_|\___/ \__,_|\___|_| +# |_| |___/ # ============================================================================= # Authors: Patrick Lehmann # @@ -33,22 +33,28 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -import setuptools +from pathlib import Path +from setuptools import setup as setuptools_setup, find_packages as setuptools_find_packages -with open("README.md", "r") as file: - long_description = file.read() +gitHubNamespace = "vhdl" +projectName = "pyVHDLModel" -requirements = [] -with open("requirements.txt") as file: - for line in file.readlines(): - requirements.append(line) +# Read README for upload to PyPI +readmeFile = Path("README.md") +with readmeFile.open("r") as file: + long_description = file.read() -projectName = "pyVHDLModel" +# Read requirements file and add them to package dependency list +requirementsFile = Path("requirements.txt") +with requirementsFile.open("r") as file: + requirements = [line for line in file.readlines()] -github_url = "https://github.com/vhdl/" + projectName -rtd_url = "https://vhdl.github.io/" + projectName +# Derive URLs +sourceCodeURL = "https://github.com/{namespace}/{projectName}".format(namespace=gitHubNamespace, projectName=projectName) +documentationURL = "https://{namespace}.github.io/{projectName}".format(namespace=gitHubNamespace, projectName=projectName) -setuptools.setup( +# Assemble all package information +setuptools_setup( name=projectName, version="0.7.3", @@ -61,28 +67,32 @@ long_description=long_description, long_description_content_type="text/markdown", - url=github_url, + url=sourceCodeURL, project_urls={ - 'Documentation': rtd_url, - 'Source Code': github_url, - 'Issue Tracker': github_url + "/issues" + 'Documentation': documentationURL, + 'Source Code': sourceCodeURL, + 'Issue Tracker': sourceCodeURL + "/issues" }, # download_url="https://github.com/vhdl/pyVHDLModel/tarball/0.1.0", - packages=setuptools.find_packages(), + packages=setuptools_find_packages(), classifiers=[ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Development Status :: 3 - Alpha", # "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", + "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", + "Topic :: Software Development :: Code Generators", + "Topic :: Software Development :: Compilers", "Topic :: Utilities" ], keywords="Python3 VHDL Language Model Abstract", - python_requires='>=3.8', + python_requires='>=3.7', install_requires=requirements, )