forked from cantabular/scraperwiki-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
57 lines (47 loc) · 1.98 KB
/
Copy pathsetup.py
File metadata and controls
57 lines (47 loc) · 1.98 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
#!/usr/bin/env python2
# This file is part of Local Scraperlibs.
# Local Scraperlibs is free software: you can redistribute it and/or modify
# it under the terms of the GNU Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Local Scraperlibs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Public License for more details.
# You should have received a copy of the GNU Public License
# along with Local Scraperlibs. If not, see <http://www.gnu.org/licenses/>.
import warnings
import os
from distutils.core import setup
def has_external_dependency(name):
'Check that a non-Python dependency is installed.'
for directory in os.environ['PATH'].split(':'):
if os.path.exists(os.path.join(directory, name)):
return True
return False
if not has_external_dependency('wget'):
warnings.warn(
'wget not found: attach() and swimport() will not work.')
if not has_external_dependency('pdftohtml'):
warnings.warn(
'Local Scraperlibs requires pdftohtml, but pdftoxml was not found\n'
'in the PATH. You probably need to install it.'
)
setup(name='scraperwiki_local',
author='Thomas Levine',
author_email='thomas@scraperwiki.com',
description='Local version of scraperwiki scraperlibs',
url='https://github.com/tlevine/scraperwiki_local',
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 2.7',
'Programming Language :: SQL',
'Topic :: Database :: Front-Ends',
],
packages=['scraperwiki'],
version = '0.0.0',
license='GPL',
install_requires = open('requirements.txt').read().split('\n')[:-1],
)