1- # Template by setupmobans
1+ #!/usr/bin/env python3
2+
3+ # Template by pypi-mobans
24import os
35import sys
46import codecs
13151416LICENSE = 'New BSD'
1517DESCRIPTION = (
16- 'Read xlsx file using partial xml' +
17- ''
18+ 'Read xlsx file using partial xml'
1819)
1920URL = 'https://github.com/pyexcel/pyexcel-xlsxr'
2021DOWNLOAD_URL = '%s/archive/0.5.0.tar.gz' % URL
21- FILES = ['README.rst' , 'CHANGELOG.rst' ]
22+ FILES = ['README.rst' , 'CHANGELOG.rst' ]
2223KEYWORDS = [
23- 'python'
24+ 'python' ,
2425]
2526
2627CLASSIFIERS = [
27- 'Topic :: Office/Business' ,
28- 'Topic :: Utilities' ,
2928 'Topic :: Software Development :: Libraries' ,
3029 'Programming Language :: Python' ,
3130 'Intended Audience :: Developers' ,
4140 'lxml >= 3.4.4' ,
4241 'pyexcel-io >= 0.5.4' ,
4342]
43+ SETUP_COMMANDS = {}
4444
4545
4646PACKAGES = find_packages (exclude = ['ez_setup' , 'examples' , 'tests' ])
@@ -79,6 +79,8 @@ def run(self):
7979 try :
8080 self .status ('Removing previous builds...' )
8181 rmtree (os .path .join (HERE , 'dist' ))
82+ rmtree (os .path .join (HERE , 'build' ))
83+ rmtree (os .path .join (HERE , 'pyexcel_xlsxr.egg-info' ))
8284 except OSError :
8385 pass
8486
@@ -95,6 +97,11 @@ def run(self):
9597 sys .exit ()
9698
9799
100+ SETUP_COMMANDS .update ({
101+ 'publish' : PublishCommand
102+ })
103+
104+
98105def has_gease ():
99106 """
100107 test if github release command is installed
@@ -119,7 +126,8 @@ def read_files(*files):
119126
120127def read (afile ):
121128 """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 :
123131 content = filter_out_test_code (opened_file )
124132 content = "" .join (list (content ))
125133 return content
@@ -168,7 +176,5 @@ def filter_out_test_code(file_handle):
168176 include_package_data = True ,
169177 zip_safe = False ,
170178 classifiers = CLASSIFIERS ,
171- cmdclass = {
172- 'publish' : PublishCommand ,
173- }
179+ cmdclass = SETUP_COMMANDS
174180 )
0 commit comments