-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added kludge to work around setuptools bug
The setuptools module is introducing newlines into PKG-INFO. Added a kludge script to handle all the prep-work for registering the package, including dealing with this issue.
- Loading branch information
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Prepares for registration. | ||
__author__ = 'Aaron Hosford' | ||
|
||
import glob | ||
import os | ||
|
||
from xcs import __version__ | ||
import build_readme | ||
|
||
build_readme.build_readme() | ||
os.system('python setup.py sdist bdist_wheel') | ||
|
||
with open('xcs.egg-info/PKG-INFO', encoding='utf-8', mode='rU') as infile: | ||
with open('xcs.egg-info/PKG-INFO-FIXED', encoding='utf-8', mode='w') as outfile: | ||
prev_skipped = False | ||
for line in infile: | ||
if line.strip() or prev_skipped: | ||
outfile.write(line) | ||
prev_skipped = False | ||
else: | ||
prev_skipped = True | ||
os.remove('xcs.egg-info/PKG-INFO') | ||
os.rename('xcs.egg-info/PKG-INFO-FIXED', 'xcs.egg-info/PKG-INFO') | ||
|
||
dist = glob.glob('dist\\*' + __version__ + '*.whl')[-1] | ||
print(dist) | ||
os.system('pip install dist\\' + os.path.basename(dist) + ' --upgrade') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters