forked from reingart/pyafipws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
93 lines (79 loc) · 2.85 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
90
91
92
93
#!/usr/bin/python
# -*- coding: utf8 -*-
# Para hacer el ejecutable:
# python setup.py py2exe
#
"Creador de instalador para PyAfipWs"
from __future__ import print_function
from __future__ import absolute_import
__author__ = "Mariano Reingart ([email protected])"
__copyright__ = "Copyright (C) 2008-2021 Mariano Reingart"
from distutils.core import setup
import glob
import os
import subprocess
import warnings
import sys
try:
rev = subprocess.check_output(
["git", "rev-list", "--count", "--all"], stderr=subprocess.PIPE
).strip()
except:
rev = 0
__version__ = "%s.%s.%s" % (sys.version_info[0:2] + (rev,))
HOMO = True
import setuptools
kwargs = {}
desc = (
"Interfases, tools and apps for Argentina's gov't. webservices "
"(soap, com/dll, pdf, dbf, xml, etc.)"
)
kwargs["package_dir"] = {"pyafipws": "."}
kwargs["packages"] = ["pyafipws", "pyafipws.formatos"]
opts = {}
data_files = [("pyafipws/plantillas", glob.glob("plantillas/*"))]
long_desc = (
"Interfases, herramientas y aplicativos para Servicios Web"
"AFIP (Factura Electrónica, Granos, Aduana, etc.), "
"ANMAT (Trazabilidad de Medicamentos), "
"RENPRE (Trazabilidad de Precursores Químicos), "
"ARBA (Remito Electrónico)"
)
# convert the README and format in restructured text (only when registering)
if "sdist" in sys.argv and os.path.exists("README.md") and sys.platform == "linux2":
try:
cmd = ["pandoc", "--from=markdown", "--to=rst", "README.md"]
long_desc = subprocess.check_output(cmd).decode("utf8")
open("README.rst", "w").write(long_desc.encode("utf8"))
except Exception as e:
warnings.warn("Exception when converting the README format: %s" % e)
setup(
name="PyAfipWs",
version=__version__,
description=desc,
long_description=long_desc,
author="Mariano Reingart",
author_email="[email protected]",
url="https://github.com/reingart/pyafipws",
license="LGPL-3.0-or-later",
options=opts,
data_files=data_files,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.9",
"Operating System :: OS Independent",
"Operating System :: Microsoft :: Windows",
"Natural Language :: Spanish",
"Topic :: Office/Business :: Financial :: Point-Of-Sale",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Object Brokering",
],
keywords="webservice electronic invoice pdf traceability",
**kwargs
)