-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
89 lines (77 loc) · 3.43 KB
/
setup.py
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- coding: utf-8 -*-
# Copyright (c) ALT-F1 SPRL, Abdelkrim Boujraf. All rights reserved.
# Licensed under the EUPL License, Version 1.2.
# See LICENSE in the project root for license information.
from os import path
import json
import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
here = path.abspath(path.dirname(__file__))
root = path.dirname(here)
package_json = path.join(here, 'package.json')
# a workaround when installing locally from git repository with pip install -e .
if not path.isfile(package_json):
package_json = path.join(root, 'package.json')
# version number and all other params from package.json
with open(package_json, encoding='utf-8') as f:
package = json.load(f)
setuptools.setup(
name=package['name'],
version=package['version'],
author=package['author']['name'],
author_email=package['author']['email'],
description=package['description'],
license=package['license'],
long_description=long_description,
long_description_content_type='text/markdown',
url=package['repository']['url'],
install_requires=[
'requests',
'pandas',
'country-list'
],
#packages=setuptools.find_packages(include=package['name']),
# When your source code is in a subdirectory under the project root, e.g.
# `countries_utils/`, it is necessary to specify the `package_dir` argument.
#package_dir={'': package['name']}, # Optional
packages=[package['name']],
# py_modules=[package['name']],
package_data={
# If any package contains *.txt files, include them:
# '': ['*.txt'],
# And include any *.dat files found in the 'data' subdirectory
# of the 'mypkg' package, also:
#'countries_utils': ['data/*.csv'],
},
keywords=package['keywords'],
# Find the list of classifiers : https://pypi.org/classifiers/
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
# Specify which Python versions you support. In contrast to the
# 'Programming Language' classifiers above, 'pip install' will check this
# and refuse to install the project if the version does not match. If you
# do not support Python 2, you can simplify this to '>=3.5' or similar, see
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
python_requires='>=3.5',
# List additional URLs that are relevant to your project as a dict.
#
# This field corresponds to the "Project-URL" metadata fields:
# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
#
# Examples listed include a pattern for specifying where the package tracks
# issues, where the source is hosted, where to say thanks to the package
# maintainers, and where to support the project financially. The key is
# what's used to render the link text on PyPI.
project_urls={ # Optional
'Bug Reports': 'https://bitbucket.org/altf1be/dunning-cash-flow/issues?status=new&status=open',
'Company behind the library': 'http://www.alt-f1.be',
'Source': 'https://bitbucket.org/altf1be/dunning-cash-flow',
}
)