2013-12-09 11:58:50 -08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# vim: set sw=4 et:
|
|
|
|
|
2014-02-19 23:37:44 +00:00
|
|
|
from setuptools import setup, find_packages
|
2014-03-05 11:19:26 -08:00
|
|
|
from setuptools.command.test import test as TestCommand
|
2014-02-09 12:06:35 -08:00
|
|
|
import glob
|
2013-12-09 11:58:50 -08:00
|
|
|
|
2015-03-23 11:04:41 -07:00
|
|
|
from pywb import __version__
|
|
|
|
|
2014-03-05 11:19:26 -08:00
|
|
|
|
|
|
|
# Fix for TypeError: 'NoneType' object is not callable" error
|
|
|
|
# when running 'python setup.py test'
|
|
|
|
try:
|
|
|
|
import multiprocessing
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2014-03-10 19:11:19 -07:00
|
|
|
long_description = open('README.rst').read()
|
2014-03-05 11:19:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
class PyTest(TestCommand):
|
2015-11-04 16:16:10 -08:00
|
|
|
user_options = []
|
2014-03-05 11:19:26 -08:00
|
|
|
def finalize_options(self):
|
2015-11-04 16:33:19 -08:00
|
|
|
TestCommand.finalize_options(self)
|
2015-11-26 00:59:57 -08:00
|
|
|
self.test_suite = ' '
|
2014-03-05 11:19:26 -08:00
|
|
|
|
|
|
|
def run_tests(self):
|
|
|
|
import pytest
|
|
|
|
import sys
|
2014-03-27 21:43:30 -07:00
|
|
|
import os
|
|
|
|
os.environ.pop('PYWB_CONFIG_FILE', None)
|
2014-03-14 18:17:22 -07:00
|
|
|
cmdline = ' --cov-config .coveragerc --cov pywb'
|
|
|
|
cmdline += ' -v --doctest-module ./pywb/ tests/'
|
2015-11-04 16:16:10 -08:00
|
|
|
|
2014-03-14 18:17:22 -07:00
|
|
|
errcode = pytest.main(cmdline)
|
2015-11-04 16:16:10 -08:00
|
|
|
|
2014-03-05 11:19:26 -08:00
|
|
|
sys.exit(errcode)
|
|
|
|
|
2014-02-19 23:37:44 +00:00
|
|
|
setup(
|
|
|
|
name='pywb',
|
2015-03-23 11:04:41 -07:00
|
|
|
version=__version__,
|
2014-02-19 23:37:44 +00:00
|
|
|
url='https://github.com/ikreymer/pywb',
|
|
|
|
author='Ilya Kreymer',
|
2014-03-12 17:57:54 -07:00
|
|
|
author_email='ikreymer@gmail.com',
|
2015-03-23 11:04:41 -07:00
|
|
|
description='Python WayBack for web archive replay and live web proxy',
|
2014-03-05 11:19:26 -08:00
|
|
|
long_description=long_description,
|
2014-02-19 23:37:44 +00:00
|
|
|
license='GPL',
|
|
|
|
packages=find_packages(),
|
2016-04-30 15:15:35 -07:00
|
|
|
zip_safe=True,
|
2014-02-19 23:37:44 +00:00
|
|
|
provides=[
|
2014-03-02 00:26:29 -08:00
|
|
|
'pywb',
|
|
|
|
'pywb.utils',
|
|
|
|
'pywb.cdx',
|
|
|
|
'pywb.warc',
|
|
|
|
'pywb.rewrite',
|
2014-03-12 18:35:21 -07:00
|
|
|
'pywb.framework',
|
2015-03-13 19:53:50 -07:00
|
|
|
'pywb.manager',
|
2014-03-03 18:27:04 -08:00
|
|
|
'pywb.perms',
|
2014-04-04 10:09:26 -07:00
|
|
|
'pywb.webapp',
|
2016-11-08 14:30:09 -08:00
|
|
|
'pywb.apps',
|
|
|
|
'pywb.webagg',
|
|
|
|
'pywb.recorder',
|
|
|
|
'pywb.urlrewrite'
|
2014-02-19 23:37:44 +00:00
|
|
|
],
|
|
|
|
package_data={
|
2015-03-16 18:48:09 -07:00
|
|
|
'pywb': ['static/flowplayer/*', 'static/*.*', 'templates/*', '*.yaml'],
|
2014-02-19 23:37:44 +00:00
|
|
|
},
|
2014-03-05 11:19:26 -08:00
|
|
|
data_files=[
|
2015-01-10 14:06:15 -08:00
|
|
|
('sample_archive/cdx', glob.glob('sample_archive/cdx/*')),
|
2015-03-19 11:20:40 -07:00
|
|
|
('sample_archive/cdxj', glob.glob('sample_archive/cdxj/*')),
|
|
|
|
('sample_archive/non-surt-cdx', glob.glob('sample_archive/non-surt-cdx/*')),
|
2015-01-10 14:06:15 -08:00
|
|
|
('sample_archive/zipcdx', glob.glob('sample_archive/zipcdx/*')),
|
|
|
|
('sample_archive/warcs', glob.glob('sample_archive/warcs/*')),
|
|
|
|
('sample_archive/text_content',
|
2014-03-05 11:19:26 -08:00
|
|
|
glob.glob('sample_archive/text_content/*')),
|
2014-02-19 23:37:44 +00:00
|
|
|
],
|
|
|
|
install_requires=[
|
2016-02-16 16:14:10 -08:00
|
|
|
'six',
|
2014-02-19 23:37:44 +00:00
|
|
|
'chardet',
|
2014-04-09 15:46:03 -07:00
|
|
|
'requests',
|
2014-02-19 23:37:44 +00:00
|
|
|
'redis',
|
|
|
|
'jinja2',
|
2016-06-12 00:44:52 -04:00
|
|
|
'surt>=0.3.0',
|
2016-06-15 01:37:29 -04:00
|
|
|
'brotlipy',
|
2014-02-19 23:37:44 +00:00
|
|
|
'pyyaml',
|
2015-10-22 16:40:59 -04:00
|
|
|
'watchdog',
|
|
|
|
'webencodings',
|
2014-03-05 11:19:26 -08:00
|
|
|
],
|
|
|
|
tests_require=[
|
2014-02-19 23:37:44 +00:00
|
|
|
'pytest',
|
2014-04-02 10:36:55 -07:00
|
|
|
'WebTest',
|
2014-03-05 11:19:26 -08:00
|
|
|
'pytest-cov',
|
2014-03-25 11:02:32 -07:00
|
|
|
'fakeredis',
|
|
|
|
'mock',
|
2014-03-05 11:19:26 -08:00
|
|
|
],
|
|
|
|
cmdclass={'test': PyTest},
|
|
|
|
test_suite='',
|
2014-03-08 15:09:53 -08:00
|
|
|
entry_points="""
|
|
|
|
[console_scripts]
|
2015-03-22 21:50:56 -07:00
|
|
|
wayback = pywb.apps.cli:wayback
|
2015-03-23 09:08:09 -07:00
|
|
|
cdx-server = pywb.apps.cli:cdx_server
|
|
|
|
live-rewrite-server = pywb.apps.cli:live_rewrite_server
|
2014-06-19 13:37:42 -07:00
|
|
|
cdx-indexer = pywb.warc.cdxindexer:main
|
2015-03-17 19:05:39 -07:00
|
|
|
wb-manager = pywb.manager.manager:main_wrap_exc
|
2014-03-10 19:19:41 -07:00
|
|
|
""",
|
2014-03-10 19:11:19 -07:00
|
|
|
classifiers=[
|
|
|
|
'Development Status :: 4 - Beta',
|
|
|
|
'Environment :: Web Environment',
|
|
|
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
|
|
|
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
|
|
'Programming Language :: Python :: 2.6',
|
|
|
|
'Programming Language :: Python :: 2.7',
|
|
|
|
'Topic :: Internet :: Proxy Servers',
|
|
|
|
'Topic :: Internet :: WWW/HTTP',
|
|
|
|
'Topic :: Internet :: WWW/HTTP :: WSGI',
|
|
|
|
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
|
|
|
|
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
|
|
|
|
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
|
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
|
|
'Topic :: System :: Archiving',
|
|
|
|
'Topic :: System :: Archiving :: Backup',
|
|
|
|
'Topic :: Utilities',
|
|
|
|
])
|