|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | + |
| 3 | +# Copyright © 2020 labfis.py |
| 4 | +# (see LICENSE for details) |
| 5 | +"""Setup module for labfis.py. |
| 6 | +
|
| 7 | +Since: |
| 8 | + Sep 19, 2019 |
| 9 | +
|
| 10 | +Authors: |
| 11 | + - Hendrik Dumith Louzada <hendriklouzada@gmail.com> |
| 12 | + - João Carlos Rodrigues Júnior <jc.rodrigues1997@usp.br> |
| 13 | +""" |
| 14 | +import codecs |
| 15 | +import os |
| 16 | +import re |
| 17 | +from setuptools import setup, find_packages |
| 18 | + |
| 19 | +def read(*parts): |
| 20 | + # intentionally *not* adding an encoding option to open, See: |
| 21 | + # https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 |
| 22 | + here = os.path.abspath(os.path.dirname(__file__)) |
| 23 | + return codecs.open(os.path.join(here, *parts), 'r').read() |
| 24 | + |
| 25 | +def find_version(*file_paths): |
| 26 | + """Find version in a Python file, searching for the __version__.""" |
| 27 | + version_file = read(*file_paths) |
| 28 | + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", |
| 29 | + version_file, re.M) |
| 30 | + if version_match: |
| 31 | + return version_match.group(1) |
| 32 | + raise RuntimeError("Unable to find version string.") |
| 33 | + |
| 34 | +version = find_version("labfis", "__init__.py") |
| 35 | +long_description = "Adds a new float class type with an float and uncertainty value" |
| 36 | + |
| 37 | +APP_NAME = "labfis" |
| 38 | +APP_DESCRIPTION = "Adds a new float type with uncertainty" |
| 39 | +AUTHOR = "Hendrik Dumith Louzada, João Carlos Rodrigues Júnior" |
| 40 | +AUTHOR_EMAIL = "hendriklouzada@gmail.com, jc.rodrigues1997@usp.br" |
| 41 | +URL = "https://github.com/Ovenbird-j/labfis.py" |
| 42 | +THEME_NAME = "Fusion" |
| 43 | +COPYRIGHT = "Copyright (C) 2020, labfis" |
| 44 | + |
| 45 | + |
| 46 | +classifiers = [ |
| 47 | + 'Development Status :: 4 - Beta', |
| 48 | + 'Framework :: labfis', |
| 49 | + 'Intended Audience :: End Users/Desktop', |
| 50 | + 'Intended Audience :: Developers', |
| 51 | + 'Operating System :: Microsoft :: Windows', |
| 52 | + 'Operating System :: POSIX', |
| 53 | + 'Programming Language :: Python 2.7 :: Python 3 :: Python 3.8'] |
| 54 | + |
| 55 | +python_ver = '>=2.7' |
| 56 | + |
| 57 | +setup(name=APP_NAME, |
| 58 | + version=version, |
| 59 | + description=APP_DESCRIPTION, |
| 60 | + author=AUTHOR, |
| 61 | + author_email=AUTHOR_EMAIL, |
| 62 | + url=URL, |
| 63 | + long_description=long_description, |
| 64 | + packages=find_packages(), |
| 65 | + classifiers=classifiers, |
| 66 | + python_requires=python_ver, |
| 67 | +) |
0 commit comments