-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
70 lines (65 loc) · 2.33 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
# -*- coding: utf-8 -*-
"""Setup pyhapi
Author : Maajor
Email : [email protected]
"""
import io
import re
import os
import platform
from setuptools import setup
from setuptools import find_packages
from distutils.command.install_scripts import install_scripts
import subprocess
with io.open("README.md", "rt", encoding="utf8") as f:
README = f.read()
with io.open("pyhapi/__init__.py", "rt", encoding="utf8") as f:
VERSION = re.search(r'__version__ = "(.*?)"', f.read()).group(1)
class PostInstallCommand(install_scripts):
"""Post-installation for installation mode."""
def run(self):
install_scripts.run(self)
SYS = platform.system()
if SYS == "Windows":
set_path_cmd = "Powershell -Command \"start-process powershell \'-ExecutionPolicy Bypass -File {0}\sethoupath.ps1\' -Verb RunAs\"".format(os.getcwd())
subprocess.call(set_path_cmd, shell=True)
setup(
name="pyhapi",
version=VERSION,
url="https://github.com/maajor/pyhapi",
project_urls={
"Documentation": "https://pyhapi.readthedocs.io",
"Code": "https://github.com/maajor/pyhapi",
"Issue tracker": "https://github.com/maajor/pyhapi/issues",
},
license="MIT",
author="Yidong Ma(Maajor)",
author_email="[email protected]",
maintainer="Yidong Ma(Maajor)",
maintainer_email="[email protected]",
description="A object-oriented python wrapper for houdini engine's C API",
long_description=README,
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Multimedia",
"Topic :: Software Development :: Libraries :: Python Modules"
],
packages=find_packages(exclude=('tests', 'docs')),
include_package_data=True,
python_requires=">=3.6",
setup_requires=['pytest-runner'],
install_requires=['numpy>=1.15.0'],
tests_require=['pytest', 'pytest-asyncio'],
long_description_content_type="text/markdown",
cmdclass={
'install_scripts': PostInstallCommand
},
)