Show More
@@ -144,32 +144,11 b" setup_args['data_files'] = data_files" | |||
|
144 | 144 | #--------------------------------------------------------------------------- |
|
145 | 145 | # imports here, so they are after setuptools import if there was one |
|
146 | 146 | from distutils.command.sdist import sdist |
|
147 | from distutils.command.upload import upload | |
|
148 | ||
|
149 | class UploadWindowsInstallers(upload): | |
|
150 | ||
|
151 | description = "Upload Windows installers to PyPI (only used from tools/release_windows.py)" | |
|
152 | user_options = upload.user_options + [ | |
|
153 | ('files=', 'f', 'exe file (or glob) to upload') | |
|
154 | ] | |
|
155 | def initialize_options(self): | |
|
156 | upload.initialize_options(self) | |
|
157 | meta = self.distribution.metadata | |
|
158 | base = '{name}-{version}'.format( | |
|
159 | name=meta.get_name(), | |
|
160 | version=meta.get_version() | |
|
161 | ) | |
|
162 | self.files = os.path.join('dist', '%s.*.exe' % base) | |
|
163 | ||
|
164 | def run(self): | |
|
165 | for dist_file in glob(self.files): | |
|
166 | self.upload_file('bdist_wininst', 'any', dist_file) | |
|
167 | 147 | |
|
168 | 148 | setup_args['cmdclass'] = { |
|
169 | 149 | 'build_py': \ |
|
170 | 150 | check_package_data_first(git_prebuild('IPython')), |
|
171 | 151 | 'sdist' : git_prebuild('IPython', sdist), |
|
172 | 'upload_wininst' : UploadWindowsInstallers, | |
|
173 | 152 | 'symlink': install_symlinked, |
|
174 | 153 | 'install_lib_symlink': install_lib_symlink, |
|
175 | 154 | 'install_scripts_sym': install_scripts_for_symlink, |
General Comments 0
You need to be logged in to leave comments.
Login now