forked from PabloCastellano/bormeparser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·61 lines (52 loc) · 1.88 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
# -*- coding: utf-8 -*-
import os
from glob import glob
from setuptools import setup, find_packages
version = '0.5.2.dev0'
def get_install_requires():
"""
parse requirements.txt, ignore links, exclude comments
"""
requirements = []
for requirements_file in ('requirements.txt',):
for line in open(requirements_file).readlines():
line = line.rstrip()
# skip to next iteration if comment or empty line
if any([line.startswith('#'), line == '', line.startswith('http'), line.startswith('git'), line == '-r base.txt']):
continue
# add line to requirements
requirements.append(line)
return requirements
try:
os.symlink('../examples', 'bormeparser/examples')
except FileExistsError:
pass
setup(
name='bormeparser',
packages=find_packages(exclude=['*.tests']),
package_data={
"bormeparser": glob("examples/*")
},
version=version,
description="bormeparser is a Python library for parsing BORME files",
long_description=open('README.md', encoding='utf-8').read(),
author='Pablo Castellano',
author_email='[email protected]',
url='https://github.com/PabloCastellano/bormeparser/',
download_url='https://github.com/PabloCastellano/bormeparser/archive/master.zip',
keywords=['BORME', 'transparency', 'opendata', 'Spain', 'Registro mercantil', 'Boletín Oficial del Registro Mercantil'],
classifiers=[
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
license="GPLv3+",
data_files=[('', ['LICENSE.txt'])],
include_package_data=True,
zip_safe=False,
install_requires=get_install_requires(),
test_suite="bormeparser.tests"
)
os.unlink('bormeparser/examples')