1
- from distutils .core import setup
1
+ #!/usr/bin/env python
2
+
3
+ import os
4
+ import re
5
+ import shutil
6
+ import sys
7
+
8
+ try :
9
+ from setuptools import setup , Command
10
+ from setuptools .extension import Extension
11
+ except ImportError :
12
+ raise RuntimeError ('setuptools is required' )
13
+
14
+ DESCRIPTION = 'Python port of the PVLIB package'
15
+ LONG_DESCRIPTION = open ('README.txt' ).read ()
16
+
17
+ DISTNAME = 'pvlib'
18
+ LICENSE = 'The BSD 3-Clause License'
19
+ AUTHOR = 'Dan Riley, Clifford Hanson, Rob Andrews, github contributors'
20
+ MAINTAINER_EMAIL = '[email protected] '
21
+ URL = 'https://github.com/Sandia-Labs/PVLIB_Python'
22
+
23
+ MAJOR = 0
24
+ MINOR = 2
25
+ MICRO = 0
26
+ VERSION = '%d.%d.%d' % (MAJOR , MINOR , MICRO )
27
+
28
+ # check python version.
29
+ if sys .version_info [:2 ] != (2 , 7 ):
30
+ sys .exit ('%s requires Python 2.7' % DISTNAME )
31
+
32
+ setuptools_kwargs = {
33
+ 'zip_safe' : False ,
34
+ 'install_requires' : ['numpy >= 1.7.0' ,
35
+ 'pandas >= 0.13' ,
36
+ 'pytz' ,
37
+ ],
38
+ 'scripts' : [],
39
+ 'include_package_data' : True
40
+ }
41
+
42
+ # more packages that we should consider requiring:
43
+ # 'scipy >= 0.14.0',
44
+ # 'matplotlib',
45
+ # 'ipython >= 2.0',
46
+ # 'pyzmq >= 2.1.11',
47
+ # 'jinja2',
48
+ # 'tornado',
49
+ # 'pyephem',
50
+
51
+
52
+ # set up pvlib packages to be installed and extensions to be compiled
53
+ PACKAGES = ['pvlib' ,
54
+ 'pvlib.spa_c_files' ]
55
+
56
+ extensions = []
57
+
58
+ spa_ext = Extension ('pvlib/spa_c_files/spa_py' ,
59
+ ['pvlib/spa_c_files/spa.c' , 'pvlib/spa_c_files/spa_py.c' ])
60
+ extensions .append (spa_ext )
61
+
2
62
3
- setup (
4
- name = 'pvlpy' ,
5
- version = '0.1' ,
6
- author = 'Dan Riley, Clifford Hanson and Rob Andrews' ,
7
-
8
- packages = [ 'pvlpy' , 'pvlpy.test' ] ,
9
- license = 'The BSD 3-Clause License' ,
10
- url = 'https://github.com/Sandia-Labs/PVLIB_Python' , #
11
- download_url = 'https://github.com/Sandia-Labs/PVLIB_Python/tarball/0.1' , # I'll explain this in a second
12
- long_description = open ( 'README.txt' ). read () ,
13
- )
63
+ setup (name = DISTNAME ,
64
+ version = VERSION ,
65
+ packages = PACKAGES ,
66
+ ext_modules = extensions ,
67
+ description = DESCRIPTION ,
68
+ long_description = LONG_DESCRIPTION ,
69
+ author = AUTHOR ,
70
+ maintainer_email = MAINTAINER_EMAIL ,
71
+ license = LICENSE ,
72
+ url = URL ,
73
+ ** setuptools_kwargs )
0 commit comments