mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN: Upload source tarball in build process to facilitate creation of gentoo ebuild
This commit is contained in:
parent
9233b2c13b
commit
44e35caa00
@ -78,7 +78,7 @@ def main(args=sys.argv):
|
|||||||
try:
|
try:
|
||||||
login(opts.username, opts.password)
|
login(opts.username, opts.password)
|
||||||
except mechanize.FormNotFoundError:
|
except mechanize.FormNotFoundError:
|
||||||
raise LibraryThingError(_(_('LibraryThing.com server error. Try again later.')))
|
raise LibraryThingError(_('LibraryThing.com server error. Try again later.'))
|
||||||
|
|
||||||
cover_data, ext = cover_from_isbn(isbn)
|
cover_data, ext = cover_from_isbn(isbn)
|
||||||
if not ext:
|
if not ext:
|
||||||
|
11
upload.py
11
upload.py
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
import tempfile
|
||||||
import sys, os, shutil, time
|
import sys, os, shutil, time
|
||||||
sys.path.append('src')
|
sys.path.append('src')
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -107,6 +108,14 @@ def upload_user_manual():
|
|||||||
finally:
|
finally:
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
|
||||||
|
def build_tarball():
|
||||||
|
cwd = os.getcwd()
|
||||||
|
check_call('bzr export dist/calibre-%s.tar.bz2'%__version__)
|
||||||
|
|
||||||
|
def upload_tarball():
|
||||||
|
check_call('ssh divok rm -f %s/calibre-\*.tar.bz2'%DOWNLOADS)
|
||||||
|
check_call('scp dist/calibre-*.tar.bz2 divok:%s/'%DOWNLOADS)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
upload = len(sys.argv) < 2
|
upload = len(sys.argv) < 2
|
||||||
shutil.rmtree('build')
|
shutil.rmtree('build')
|
||||||
@ -119,11 +128,13 @@ def main():
|
|||||||
tag_release()
|
tag_release()
|
||||||
upload_demo()
|
upload_demo()
|
||||||
build_installers()
|
build_installers()
|
||||||
|
build_tarball()
|
||||||
if upload:
|
if upload:
|
||||||
print 'Uploading installers...'
|
print 'Uploading installers...'
|
||||||
upload_installers()
|
upload_installers()
|
||||||
print 'Uploading to PyPI'
|
print 'Uploading to PyPI'
|
||||||
check_call('''python setup.py register bdist_egg --exclude-source-files upload''')
|
check_call('''python setup.py register bdist_egg --exclude-source-files upload''')
|
||||||
|
upload_tarball()
|
||||||
upload_docs()
|
upload_docs()
|
||||||
upload_user_manual()
|
upload_user_manual()
|
||||||
check_call('''rm -rf dist/* build/*''')
|
check_call('''rm -rf dist/* build/*''')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user