-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
60 lines (53 loc) · 1.8 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
#!/bin/python3
# -*- coding: utf-8 -*-
from matlab_wrapper.matlab_session import MatlabSession
import warnings
from os import path
from setuptools import setup, find_packages
try:
import matlab.engine
print('matlab engine already installed.\n')
except:
print('Installing the matlab engine...', end='')
try:
matlab = MatlabSession()
matlab.eval("cd (fullfile(matlabroot,'extern','engines','python'))")
matlab.eval("system('python setup.py install')")
try:
import matlab.engine
print('done.\n')
except:
warnings.warn(
"\nFailed to install matlab engine. In any case you can use pynare with engine='octave'.\n")
except:
warnings.warn(
"\nFailed to access matlab installation. Is it installed? In any case you can use pynare with engine='octave'.\n")
# read the contents of your README file
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://pynare.readthedocs.io/en/latest/index.html",
name='pynare',
version='0.1.6',
author='Gregor Boehl',
author_email='admin@gregorboehl.com',
license='MIT',
description='run DYNARE from python and access its workspace',
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=['pynare'],
entry_points={
'console_scripts': [
'pynare = pynare.core:pynare'
]
},
install_requires=['numpy',
'pathos'],
include_package_data=True,
)