-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
59 lines (51 loc) · 1.9 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
from pathlib import Path
import sys
import setuptools
PACKAGE_NAME = "cqgridfinity"
required = ["cadquery", "cqkit>=0.5.6"]
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 to make Gridfinity compatible objects with CadQuery.",
url="https://github.com/michaelgale/cq-gridfinity",
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.9",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
],
install_requires=required,
dependency_links=dependency_links,
entry_points={
"console_scripts": [
"gridfinitybox=cqgridfinity.scripts.gridfinitybox:main",
"gridfinitybase=cqgridfinity.scripts.gridfinitybase:main",
"ruggedbox=cqgridfinity.scripts.ruggedbox:main",
],
},
)