-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
53 lines (47 loc) · 1.79 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
import re
from pip._vendor.requests.sessions import session
import setuptools
from pip._internal.req import parse_requirements
install_reqs = list(parse_requirements('requirements.txt', session='false'))
try:
reqs = [str(ir.req) for ir in install_reqs]
except:
reqs = [str(ir.requirement) for ir in install_reqs]
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
VERSION_FILE = "advhash/__init__.py"
with open(VERSION_FILE) as version_file:
match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file.read(), re.MULTILINE)
if match:
version = match.group(1)
else:
raise RuntimeError(f"Unable to find version string in {VERSION_FILE}.")
setuptools.setup(
name="advhash",
version=version,
author="Matthew Podolak",
author_email="[email protected]",
description="Adversarial attacks for perceptual image hashing functions",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/mattpodolak/advhash",
packages=setuptools.find_packages(),
license='GNU GPLv3',
install_requires=reqs,
keywords='adversarial attacks image hashing',
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3 :: Only",
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
],
python_requires='>=3.5',
)