From e395b06746de6bc038051641ab60ca73ea770d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20H=C3=A9risson?= Date: Wed, 1 Apr 2026 14:09:28 +0200 Subject: [PATCH] build: add setup.py --- setup.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..40e6013 --- /dev/null +++ b/setup.py @@ -0,0 +1,58 @@ +# coding: utf-8 +from setuptools import setup, find_packages +from os import path as os_path + +## INFOS ## +package = "rpcompletion" +descr = "Libraries for rpTools" +url = "https://github.com/brsynth/rpCompletion" +authors = "Joan Hérisson, Melchior du Lac, Thomas Duigou" +corr_author = "joan.herisson@univ-evry.fr" + +## LONG DESCRIPTION +with open( + os_path.join(os_path.dirname(os_path.realpath(__file__)), "README.md"), + "r", + encoding="utf-8", +) as f: + long_description = f.read() + + +def get_version(): + with open( + os_path.join( + os_path.dirname(os_path.realpath(__file__)), package, "_version.py" + ), + "r", + ) as f: + lines = f.readlines() + for line in lines: + if line.startswith("##"): + from re import search + + m = search("\[(.+)\]", line) + if m: + return m.group(1) + + +setup( + name=package, + version=get_version(), + author=authors, + author_email=corr_author, + description=descr, + long_description=long_description, + long_description_content_type="text/markdown", + url=url, + packages=find_packages(), + package_dir={package: package}, + include_package_data=True, + test_suite="pytest", + license="MIT", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires=">=3.7", +)