diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-28 22:19:37 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-28 22:19:37 +0100 |
commit | 224f1fa0c327f3fa08a865d6ae79d9cdb1ba19c4 (patch) | |
tree | 188a1d41da59c18697c649daecaa1cc6a5ed533b /setup.py | |
parent | 03f830b44469bad7cb4ca525c7f41c20bc1dc68d (diff) | |
download | ghdl-224f1fa0c327f3fa08a865d6ae79d9cdb1ba19c4.tar.gz ghdl-224f1fa0c327f3fa08a865d6ae79d9cdb1ba19c4.tar.bz2 ghdl-224f1fa0c327f3fa08a865d6ae79d9cdb1ba19c4.zip |
Tiny improvements.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -36,22 +36,24 @@ # SPDX-License-Identifier: GPL-2.0-or-later # ============================================================================ # -import setuptools -from re import compile as re_compile +from pathlib import Path +from re import compile as re_compile +from setuptools import setup as setuptools_setup, find_packages as setuptools_find_packages gitHubNamespace = "ghdl" projectName = "ghdl" packageName = "pyGHDL" +packagePath = Path(packageName) -# read (local) README for upload to PyPI -with open("README.md", "r") as file: +# Read (local) README for upload to PyPI +readmeFile = packagePath / "README.md" +with readmeFile.open("r") as file: long_description = file.read() # Read requirements file and add them to package dependency list -requirements = [] -with open("requirements.txt") as file: - for line in file.readlines(): - requirements.append(line) +requirementsFile = packagePath / "requirements.txt" +with requirementsFile.open("r") as file: + requirements = [line for line in file.readlines()] def get_version(): # Try from version.py. Reads it to avoid loading the shared library. @@ -71,7 +73,7 @@ sourceCodeURL = "https://github.com/{namespace}/{projectName}".format(namesp documentationURL = "https://{namespace}.github.io/{projectName}/using/py/index.html".format(namespace=gitHubNamespace, projectName=projectName) # Assemble all package information -setuptools.setup( +setuptools_setup( name=packageName, version=get_version(), @@ -89,7 +91,7 @@ setuptools.setup( 'Issue Tracker': sourceCodeURL + "/issues" }, - packages=setuptools.find_packages(), + packages=setuptools_find_packages(), entry_points={ 'console_scripts': [ "ghdl-ls = pyGHDL.cli.lsp:main" |