-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
59 lines (52 loc) · 1.94 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
54
55
56
57
58
59
from pathlib import Path
from typing import List
from setuptools import setup
def get_version(file_path: str, member: str) -> str:
"""Return the version string found in `path` as `member`."""
path = Path(__file__).parent.joinpath(file_path).absolute()
with open(path, 'r') as fp:
for line in fp:
if line.startswith(member):
return line.split('=')[1].strip(' \'\t\n"')
return ''
def get_requirements(file_path: str) -> List[str]:
"""Return the list of requirements found in `path`."""
path = Path(__file__).parent.joinpath(file_path).absolute()
requirements = []
with open(path, 'r') as fp:
for line in fp:
line = line.strip(' \t\n')
if not line.startswith('#'):
requirements.append(line)
return requirements
setup(
name="link-sync",
version=get_version('link_sync/__main__.py', '__VERSION__'),
description="Synchronize GCode files across your printer farm.",
long_description=Path(__file__).parent.joinpath('README.md').read_text(),
long_description_content_type='text/markdown',
author="Martin Koistinen",
author_email="mkoistinen@gmail.com",
url="https://github.com/mkoistinen/link-sync",
readme="README.md",
python_requires=">=3.10",
keywords=["prusalink", "prusa-link"],
license='Apache-2.0',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Environment :: Console',
],
packages=['link_sync'],
install_requires=get_requirements('requirements.in'),
entry_points={
'console_scripts': [
'link-sync=link_sync.__main__:main',
]
}
)