File: setup.py

package info (click to toggle)
gdspy 1.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,020 kB
  • sloc: python: 9,180; cpp: 4,716; sh: 39; makefile: 20
file content (80 lines) | stat: -rw-r--r-- 2,986 bytes parent folder | download
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
73
74
75
76
77
78
79
80
######################################################################
#                                                                    #
#  Copyright 2009-2019 Lucas Heitzmann Gabrielli.                    #
#  This file is part of gdspy, distributed under the terms of the    #
#  Boost Software License - Version 1.0.  See the accompanying       #
#  LICENSE file or <http://www.boost.org/LICENSE_1_0.txt>            #
#                                                                    #
######################################################################

import sys
import platform
from setuptools import setup, Extension
from distutils.version import LooseVersion

with open("README.md") as fin:
    long_description = fin.read()

with open("gdspy/__init__.py") as fin:
    for line in fin:
        if line.startswith("__version__ ="):
            version = eval(line[14:])
            break

setup_requires = []
if {"pytest", "test", "ptr"}.intersection(sys.argv):
    setup_requires.append("pytest-runner")
if "build_sphinx" in sys.argv:
    setup_requires.extend(["sphinx", "sphinx_rtd_theme"])

# Mac OS X Mojave C++ compile + linking arguments
extra_compile_args = []
extra_link_args = []
if platform.system() == "Darwin" and LooseVersion(platform.release()) >= LooseVersion(
    "17.7"
):
    extra_compile_args = ["-std=c++11", "-mmacosx-version-min=10.9"]
    extra_link_args = ["-stdlib=libc++", "-mmacosx-version-min=10.9"]

setup(
    name="gdspy",
    version=version,
    author="Lucas Heitzmann Gabrielli",
    author_email="heitzmann@gmail.com",
    license="Boost Software License v1.0",
    url="https://github.com/heitzmann/gdspy",
    description="Python module for creating/importing/merging GDSII files.",
    long_description=long_description,
    keywords="GDSII CAD layout",
    packages=["gdspy"],
    package_dir={"gdspy": "gdspy"},
    package_data={"gdspy": ["data/*"]},
    ext_modules=[
        Extension(
            "gdspy.clipper",
            ["gdspy/clipper.cpp"],
            extra_compile_args=extra_compile_args,
            extra_link_args=extra_link_args,
        )
    ],
    provides=["gdspy"],
    install_requires=["numpy"] + (["future"] if sys.version_info.major < 3 else []),
    setup_requires=setup_requires,
    tests_require=["pytest"],
    platforms="OS Independent",
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Manufacturing",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)",
        "Operating System :: OS Independent",
        "Programming Language :: C",
        "Programming Language :: C++",
        "Programming Language :: Python",
        "Programming Language :: Python :: Implementation :: CPython",
        "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
    ],
    zip_safe=False,
)