-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup.py
83 lines (68 loc) · 2.42 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
71
72
73
74
75
76
77
78
79
80
81
82
83
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
from setuptools.command.egg_info import egg_info
import os
def setup_home():
os.makedirs(os.path.expanduser('~/.pygears'), exist_ok=True)
os.makedirs(os.path.expanduser('~/.pygears/svlib'), exist_ok=True)
class PostEggInfoCommand(egg_info):
def run(self):
egg_info.run(self)
setup_home()
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
setup_home()
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
setup_home()
this_directory = os.path.abspath(os.path.dirname(__file__))
def readme():
with open(os.path.join(this_directory, 'README.rst'), encoding='utf-8') as f:
return f.read()
# TODO: Make it work for new jinja versions
setup(
name='pygears',
version='0.3.4',
description='Framework for functional hardware design approach',
long_description=readme(),
url='https://www.pygears.org',
# download_url = '',
author='Bogdan Vukobratovic',
author_email='bogdan.vukobratovic@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
python_requires='>=3.6.0',
package_data={'': ['*.j2', '*.v', '*.sv', '*.svt', '*.vt']},
include_package_data=True,
keywords='functional hardware design Python simulator HDL ASIC FPGA Gears',
install_requires=[
'jinja2', 'dataclasses;python_version<"3.7"', 'pyvcd', 'attrs', 'stopit'
],
setup_requires=[
'jinja2', 'dataclasses;python_version<"3.7"', 'pyvcd', 'attrs', 'stopit'
],
packages=find_packages(exclude=['examples*', 'docs']),
extras_require={'pytest': ['pytest', 'pytest-xdist', 'filelock']},
entry_points={
'console_scripts': [
'pygears = pygears.entry:main',
],
'pytest11': ['pytest_pygears = pygears.util.pytest_pygears']
},
cmdclass={
'develop': PostDevelopCommand,
'install': PostInstallCommand,
'egg_info': PostEggInfoCommand,
},
)