1
- # Template by setupmobans
1
+ #!/usr/bin/env python3
2
+
3
+ # Template by pypi-mobans
2
4
import os
3
5
import sys
4
6
import codecs
13
15
14
16
LICENSE = 'New BSD'
15
17
DESCRIPTION = (
16
- 'Read xlsx file using partial xml' +
17
- ''
18
+ 'Read xlsx file using partial xml'
18
19
)
19
20
URL = 'https://github.com/pyexcel/pyexcel-xlsxr'
20
21
DOWNLOAD_URL = '%s/archive/0.5.0.tar.gz' % URL
21
- FILES = ['README.rst' , 'CHANGELOG.rst' ]
22
+ FILES = ['README.rst' , 'CHANGELOG.rst' ]
22
23
KEYWORDS = [
23
- 'python'
24
+ 'python' ,
24
25
]
25
26
26
27
CLASSIFIERS = [
27
- 'Topic :: Office/Business' ,
28
- 'Topic :: Utilities' ,
29
28
'Topic :: Software Development :: Libraries' ,
30
29
'Programming Language :: Python' ,
31
30
'Intended Audience :: Developers' ,
41
40
'lxml >= 3.4.4' ,
42
41
'pyexcel-io >= 0.5.4' ,
43
42
]
43
+ SETUP_COMMANDS = {}
44
44
45
45
46
46
PACKAGES = find_packages (exclude = ['ez_setup' , 'examples' , 'tests' ])
@@ -79,6 +79,8 @@ def run(self):
79
79
try :
80
80
self .status ('Removing previous builds...' )
81
81
rmtree (os .path .join (HERE , 'dist' ))
82
+ rmtree (os .path .join (HERE , 'build' ))
83
+ rmtree (os .path .join (HERE , 'pyexcel_xlsxr.egg-info' ))
82
84
except OSError :
83
85
pass
84
86
@@ -95,6 +97,11 @@ def run(self):
95
97
sys .exit ()
96
98
97
99
100
+ SETUP_COMMANDS .update ({
101
+ 'publish' : PublishCommand
102
+ })
103
+
104
+
98
105
def has_gease ():
99
106
"""
100
107
test if github release command is installed
@@ -119,7 +126,8 @@ def read_files(*files):
119
126
120
127
def read (afile ):
121
128
"""Read a file into setup"""
122
- with codecs .open (afile , 'r' , 'utf-8' ) as opened_file :
129
+ the_relative_file = os .path .join (HERE , afile )
130
+ with codecs .open (the_relative_file , 'r' , 'utf-8' ) as opened_file :
123
131
content = filter_out_test_code (opened_file )
124
132
content = "" .join (list (content ))
125
133
return content
@@ -168,7 +176,5 @@ def filter_out_test_code(file_handle):
168
176
include_package_data = True ,
169
177
zip_safe = False ,
170
178
classifiers = CLASSIFIERS ,
171
- cmdclass = {
172
- 'publish' : PublishCommand ,
173
- }
179
+ cmdclass = SETUP_COMMANDS
174
180
)
0 commit comments