-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
54 lines (44 loc) · 1.58 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
from pathlib import Path
import sys
import setuptools
PACKAGE_NAME = "cqkit"
required = []
dependency_links = []
def read_package_variable(key, filename="__init__.py"):
"""Read the value of a variable from the package without importing."""
module_path = os.path.join(PACKAGE_NAME, filename)
with open(module_path) as module:
for line in module:
parts = line.strip().split(" ", 2)
if parts[:-1] == [key, "="]:
return parts[-1].strip("'")
sys.exit("'{0}' not found in '{1}'".format(key, module_path))
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setuptools.setup(
name=read_package_variable("__project__"),
version=read_package_variable("__version__"),
description="A python library of CadQuery tools and helpers for building 3D CAD models.",
url="https://github.com/michaelgale/cq-kit",
author="Michael Gale",
author_email="michael@fxbricks.com",
python_requires=">=3.9",
packages=setuptools.find_packages(),
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
],
install_requires=required,
dependency_links=dependency_links,
)