This repository was archived by the owner on Mar 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
62 lines (56 loc) · 2.07 KB
/
Copy pathsetup.py
File metadata and controls
62 lines (56 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# python-electricity
# ---------------
# Python library for identitying the tariff period of a given date.
#
# Author: Diogo Gomes <diogogomes@gmail.com> (c) 2019
# Website: https://github.com/dgomes/python-electricity
# License: MIT (see LICENSE file)
import codecs
import re
import io
import os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
with codecs.open('electricity/tariffs.py', 'r', 'utf-8') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('Cannot find version information')
try:
with io.open(os.path.join(".", 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
raise RuntimeError('Cannot find README.md')
setup(
name='python-electricity',
version=version,
packages=find_packages(),
author='dgomes',
author_email='diogogomes@gmail.com',
maintainer='dgomes',
maintainer_email='diogogomes@gmail.com',
url='https://github.com/dgomes/python-electricity',
bugtrack_url='https://github.com/dgomes/python-electricity/issues',
license='MIT',
py_modules=['electricity'],
description='Determine Electricity Tariff Periods in Python',
long_description=long_description,
long_description_content_type='text/markdown',
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business :: Scheduling',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Localization',
],
)