-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
42 lines (35 loc) · 1.26 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
import os
import re
from setuptools import setup
from setuptools import find_packages
with open("README.md", "r") as file:
long_description = file.read()
with open("requirements.txt", encoding="utf8") as file:
requirements = file.readlines()
def find_version(*filepath):
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, *filepath)) as fp:
if version_match := re.search(
r"^__version__ = ['\"]([^'\"]*)['\"]", fp.read(), re.M
):
return version_match[1]
raise RuntimeError("Unable to find version string.")
setup(
name="pytorch_mmap_dataset",
version=find_version("pytorch_mmap_dataset/__init__.py"),
author="Tudor Surdoiu",
author_email="[email protected]",
license="MIT",
description="TODO",
long_description=long_description,
long_description_content_type="text/markdown",
keywords=["pytorch", "deep-learning"],
url="https://github.com/DACUS1995/pytorch-mmap-dataset",
packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=requirements,
)