forked from jmaupetit/md2pdf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
72 lines (64 loc) · 2.21 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
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
md2pdf - setup file
"""
from pathlib import Path
from setuptools import setup, find_packages
def parse_requirements(requirements, ignore=("setuptools",)):
"""
Read dependencies from requirements file (with version numbers if any)
Notes:
- this implementation does not support requirements files with extra
requirements
- this implementation has been taken from TailorDev/Watson's setup file
"""
with open(requirements) as f:
packages = set()
for line in f:
line = line.strip()
if line.startswith(("#", "-r", "--")):
continue
if "#egg=" in line:
line = line.split("#egg=")[1]
pkg = line.strip()
if pkg not in ignore:
packages.add(pkg)
return list(packages)
about = {}
with Path("md2pdf", "version.py").open(mode="r", encoding="utf-8") as f:
exec(f.read(), about)
setup(
name="md2pdf",
version=about["__version__"],
packages=find_packages(),
install_requires=parse_requirements("requirements.txt"),
setup_requires=[
"pytest-runner",
],
tests_require=parse_requirements("requirements-dev.txt"),
author="Julien Maupetit",
description="md2pdf, a Markdown to PDF conversion tool",
license="MIT",
keywords="markdown converter css pdf",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Customer Service",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: Other Audience",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Office/Business",
"Topic :: Utilities",
],
)