setup.py 3.91 KB
Newer Older
1
#!/usr/bin/env python
2 3 4 5
# -*- coding: utf-8 -*-
"""
$Id$

6
Copyright 2010 Lars Kruse <devel@sumpfralle.de>
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Copyright 2010 Arthur Magill

This file is part of PyCAM.

PyCAM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PyCAM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PyCAM.  If not, see <http://www.gnu.org/licenses/>.
"""
24

25 26 27 28 29
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

30 31 32
import distutils.sysconfig
import glob
import os.path
33
import sys
34
import shutil
35

36
from pycam import VERSION
37

38 39
WINDOWS_START_SCRIPT = os.path.join("scripts", "pycam-loader.py")
DEFAULT_START_SCRIPT = os.path.join("scripts", "pycam")
40 41

# we don't want to include the windows postinstall script in other installers
sumpfralle's avatar
sumpfralle committed
42
is_windows_installer = "bdist_wininst" in sys.argv or "bdist_msi" in sys.argv
43 44 45 46

if is_windows_installer:
    shutil.copy2(os.path.join(BASE_DIR, DEFAULT_START_SCRIPT),
            os.path.join(BASE_DIR, WINDOWS_START_SCRIPT))
47 48
    PLATFORM_SCRIPTS = [WINDOWS_START_SCRIPT,
            os.path.join("scripts", "pycam_win32_postinstall.py")]
49 50 51
else:
    PLATFORM_SCRIPTS = [DEFAULT_START_SCRIPT]

sumpfralle's avatar
sumpfralle committed
52

53 54
setup(
    name="pycam",
55
    version=VERSION,
56 57
    license="GPL v3",
    description="Open Source CAM - Toolpath Generation for 3-Axis CNC machining",
sumpfralle's avatar
sumpfralle committed
58 59
    author="Lars Kruse",
    author_email="devel@sumpfralle.de",
60
    provides=["pycam"],
61
    requires=["ode", "gtk", "gtk.gtkgl", "OpenGL"],
62
    url="http://sourceforge.net/projects/pycam",
63
    download_url="http://sourceforge.net/projects/pycam/files",
64
    keywords=["3-axis", "cnc", "cam", "toolpath", "machining", "g-code"],
65 66 67
    long_description="""IMPORTANT NOTE: Please read the list of requirements:
http://sourceforge.net/apps/mediawiki/pycam/index.php?title=Requirements
Basically you will need Python, GTK and OpenGL.
68 69

Windows: select Python 2.5 in the following dialog.
70
""",
71 72 73 74 75
    # full list of classifiers at:
    #   http://pypi.python.org/pypi?:action=list_classifiers
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
76
        "Development Status :: 4 - Beta",
77 78 79
        "License :: OSI Approved :: GNU General Public License (GPL)",
        "Topic :: Scientific/Engineering",
        "Environment :: Win32 (MS Windows)",
sumpfralle's avatar
sumpfralle committed
80
        "Environment :: X11 Applications :: GTK",
81 82
        "Intended Audience :: Manufacturing",
        "Operating System :: Microsoft :: Windows",
sumpfralle's avatar
sumpfralle committed
83
        "Operating System :: MacOS :: MacOS X",
84 85 86 87
        "Operating System :: POSIX",
    ],
    packages=[
        "pycam",
88
        "pycam.Cutters",
89
        "pycam.Exporters",
sumpfralle's avatar
sumpfralle committed
90
        "pycam.Geometry",
91
        "pycam.Gui",
sumpfralle's avatar
sumpfralle committed
92
        "pycam.Importers",
93
        "pycam.PathGenerators",
sumpfralle's avatar
sumpfralle committed
94 95
        "pycam.PathProcessors",
        "pycam.Physics",
96
        "pycam.Plugins",
97 98
        "pycam.Simulation",
        "pycam.Toolpath",
sumpfralle's avatar
sumpfralle committed
99
        "pycam.Utils",
100
    ],
101
    scripts = PLATFORM_SCRIPTS,
102
    data_files=[("share/pycam/doc", [
103 104 105
            "COPYING.TXT",
            "INSTALL.TXT",
            "LICENSE.TXT",
106
            "README.TXT",
107 108
            "Changelog",
            "release_info.txt"]),
sumpfralle's avatar
sumpfralle committed
109 110 111
        ("share/pycam/ui", glob.glob(os.path.join("share", "ui", "*"))),
        ("share/pycam/fonts", glob.glob(os.path.join("share", "fonts", "*"))),
        ("share/pycam", [os.path.join("share", "pycam.ico"), os.path.join("share", "misc", "DXF.gpl")]),
112
        ("share/pycam/samples", glob.glob(os.path.join("samples", "*"))),
113 114 115
    ],
)

116 117 118
if is_windows_installer:
    os.remove(os.path.join(BASE_DIR, WINDOWS_START_SCRIPT))

119
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4