forked from mirumee/google-i18n-address
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·61 lines (50 loc) · 1.94 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
#! /usr/bin/env python
import io
import logging
from setuptools import setup, find_packages, Command
class DownloadJSONFiles(Command):
description = "Download all addresses data from Google i18n API"
user_options = [("country=", "c", "Download data only for this country")]
country = None
logger = None
def initialize_options(self):
logging.basicConfig()
self.logger = logging.getLogger("i18naddress.downloader")
self.logger.setLevel(logging.DEBUG)
def finalize_options(self):
pass
def run(self):
from i18naddress.downloader import download
download(country=self.country)
def get_long_description():
with io.open("README.rst", encoding="utf-8") as readme_file:
readme = readme_file.read()
# add GitHub badge in PyPi
return readme.replace(
"|codecov.io| |Circle CI| |PyPi downloads| |requires.io| |PyPi version| |PyPi pythons|", # noqa
"|codecov.io| |Circle CI| |PyPi downloads| |requires.io| |PyPi version| |PyPi pythons| |GitHub|",
) # noqa
setup(
name="google-i18n-address",
long_description=get_long_description(),
author="Mirumee Software",
author_email="[email protected]",
description="Address validation helpers for Google's i18n address database",
license="BSD",
version="2.5.2",
url="https://github.com/mirumee/google-i18n-address",
packages=find_packages(exclude=["tests"]),
include_package_data=True,
install_requires=["requests>=2.7.0"],
tests_require=["mock", "pytest-cov", "pytest"],
cmdclass={"update_validation_files": DownloadJSONFiles},
zip_safe=False,
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Environment :: Web Environment",
"Topic :: Software Development :: Internationalization",
],
)