2013-11-15 22:35:32 -08:00
|
|
|
#!/usr/bin/env python
|
2016-06-27 14:18:21 -05:00
|
|
|
'''
|
|
|
|
setup.py - setuptools installation configuration for warcprox
|
|
|
|
|
2024-06-04 11:48:25 -07:00
|
|
|
Copyright (C) 2013-2024 Internet Archive
|
2016-06-27 14:18:21 -05:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
|
|
|
USA.
|
|
|
|
'''
|
|
|
|
|
2014-01-17 12:13:39 -08:00
|
|
|
import sys
|
2015-11-13 01:17:35 +00:00
|
|
|
import setuptools
|
2014-01-17 12:13:39 -08:00
|
|
|
|
2015-11-13 01:17:35 +00:00
|
|
|
deps = [
|
2019-02-12 15:04:22 -08:00
|
|
|
'warctools>=4.10.0',
|
2019-03-21 12:59:32 -07:00
|
|
|
'urlcanon>=0.3.0',
|
2024-10-31 11:07:35 -07:00
|
|
|
'doublethink==0.4.9',
|
require more recent urllib3
to avoid this error: https://github.com/internetarchive/warcprox/issues/148
2020-01-28 14:42:44,851 2023 ERROR MitmProxyHandler(tid=2037,started=2020-01-28T20:42:44.834551,client=127.0.0.1:49100) warcprox.warcprox.WarcProxyHandler.do_COMMAND(mitmproxy.py:442) problem processing request 'GET / HTTP/1.1': TypeError("connection_from_host() got an unexpected keyword argument 'pool_kwargs'",)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/warcprox/mitmproxy.py", line 413, in do_COMMAND
self._connect_to_remote_server()
File "/usr/local/lib/python3.5/dist-packages/warcprox/warcproxy.py", line 189, in _connect_to_remote_server
return warcprox.mitmproxy.MitmProxyHandler._connect_to_remote_server(self)
File "/usr/local/lib/python3.5/dist-packages/warcprox/mitmproxy.py", line 277, in _connect_to_remote_server
pool_kwargs={'maxsize': 12, 'timeout': self._socket_timeout})
TypeError: connection_from_host() got an unexpected keyword argument 'pool_kwargs'
2020-02-06 10:10:53 -08:00
|
|
|
'urllib3>=1.23',
|
2019-02-12 15:04:22 -08:00
|
|
|
'requests>=2.0.1',
|
|
|
|
'PySocks>=1.6.8',
|
Upgrade cryptography dependency to >=39,<40
warcprox crashes with the following error when using
`cryptography==35.0.0`.
```
ValueError: Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?
Traceback (most recent call last):
File "/opt/spn2/bin/warcprox", line 8, in <module>
sys.exit(main())
File "/opt/spn2/lib/python3.8/site-packages/warcprox/main.py", line 330, in main
controller = warcprox.controller.WarcproxController(options)
File "/opt/spn2/lib/python3.8/site-packages/warcprox/controller.py", line 145, in __init__
self.proxy = warcprox.warcproxy.WarcProxy(
File "/opt/spn2/lib/python3.8/site-packages/warcprox/warcproxy.py", line 561, in __init__
SingleThreadedWarcProxy.__init__(
File "/opt/spn2/lib/python3.8/site-packages/warcprox/warcproxy.py", line 509, in __init__
warcprox.mitmproxy.SingleThreadedMitmProxy.__init__(
File "/opt/spn2/lib/python3.8/site-packages/warcprox/mitmproxy.py", line 861, in __init__
self.ca = CertificateAuthority(
File "/opt/spn2/lib/python3.8/site-packages/warcprox/certauth.py", line 69, in __init__
self.cert, self.key = self.read_pem(ca_file)
File "/opt/spn2/lib/python3.8/site-packages/warcprox/certauth.py", line 210, in read_pem
cert = x509.load_pem_x509_certificate(f.read(), default_backend())
File "/opt/spn2/lib/python3.8/site-packages/cryptography/x509/base.py", line 436, in load_pem_x509_certificate
return rust_x509.load_pem_x509_certificate(data)
ValueError: Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?
```
2024-07-28 10:01:01 +00:00
|
|
|
'cryptography>=39,<40',
|
2023-07-09 10:02:13 +00:00
|
|
|
'idna',
|
2019-03-21 19:34:52 +00:00
|
|
|
'PyYAML>=5.1',
|
2019-05-09 10:03:16 +00:00
|
|
|
'cachetools',
|
2022-04-21 18:37:27 +00:00
|
|
|
'rfc3986>=1.5.0',
|
2015-11-13 01:17:35 +00:00
|
|
|
]
|
2015-10-28 21:02:42 +00:00
|
|
|
try:
|
|
|
|
import concurrent.futures
|
|
|
|
except:
|
|
|
|
deps.append('futures')
|
|
|
|
|
2016-06-27 14:46:42 -05:00
|
|
|
setuptools.setup(
|
|
|
|
name='warcprox',
|
2024-11-05 18:05:51 -08:00
|
|
|
version='2.6.0',
|
2013-11-15 22:35:32 -08:00
|
|
|
description='WARC writing MITM HTTP/S proxy',
|
|
|
|
url='https://github.com/internetarchive/warcprox',
|
|
|
|
author='Noah Levitt',
|
|
|
|
author_email='nlevitt@archive.org',
|
2018-07-17 16:35:05 +00:00
|
|
|
long_description=open('README.rst').read(),
|
2013-11-15 22:35:32 -08:00
|
|
|
license='GPL',
|
|
|
|
packages=['warcprox'],
|
2015-10-28 21:02:42 +00:00
|
|
|
install_requires=deps,
|
2024-11-05 19:11:55 -08:00
|
|
|
# preferred trough 'trough @ git+https://github.com/internetarchive/trough.git@jammy_focal'
|
|
|
|
extras_require={'trough': 'trough'},
|
2018-02-07 16:06:46 -08:00
|
|
|
setup_requires=['pytest-runner'],
|
2017-11-08 13:26:59 -08:00
|
|
|
tests_require=['mock', 'pytest', 'warcio'],
|
2016-06-27 14:46:42 -05:00
|
|
|
entry_points={
|
|
|
|
'console_scripts': [
|
2016-06-27 23:13:00 +00:00
|
|
|
'warcprox=warcprox.main:main',
|
2016-06-30 15:24:40 -05:00
|
|
|
('warcprox-ensure-rethinkdb-tables='
|
|
|
|
'warcprox.main:ensure_rethinkdb_tables'),
|
2016-06-27 14:46:42 -05:00
|
|
|
],
|
|
|
|
},
|
2013-12-19 17:03:40 -08:00
|
|
|
zip_safe=False,
|
|
|
|
classifiers=[
|
|
|
|
'Development Status :: 5 - Production/Stable',
|
|
|
|
'Environment :: Console',
|
|
|
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
2020-08-06 17:58:00 +02:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2023-09-11 16:40:39 -07:00
|
|
|
'Programming Language :: Python :: 3.9',
|
|
|
|
'Programming Language :: Python :: 3.10',
|
|
|
|
'Programming Language :: Python :: 3.11',
|
2013-12-19 17:03:40 -08:00
|
|
|
'Topic :: Internet :: Proxy Servers',
|
|
|
|
'Topic :: Internet :: WWW/HTTP',
|
2013-12-19 17:08:13 -08:00
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
2013-12-19 17:03:40 -08:00
|
|
|
'Topic :: System :: Archiving',
|
|
|
|
])
|