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:
|
||||
login(opts.username, opts.password)
|
||||
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)
|
||||
if not ext:
|
||||
|
11
upload.py
11
upload.py
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
import tempfile
|
||||
import sys, os, shutil, time
|
||||
sys.path.append('src')
|
||||
import subprocess
|
||||
@ -107,6 +108,14 @@ def upload_user_manual():
|
||||
finally:
|
||||
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():
|
||||
upload = len(sys.argv) < 2
|
||||
shutil.rmtree('build')
|
||||
@ -119,11 +128,13 @@ def main():
|
||||
tag_release()
|
||||
upload_demo()
|
||||
build_installers()
|
||||
build_tarball()
|
||||
if upload:
|
||||
print 'Uploading installers...'
|
||||
upload_installers()
|
||||
print 'Uploading to PyPI'
|
||||
check_call('''python setup.py register bdist_egg --exclude-source-files upload''')
|
||||
upload_tarball()
|
||||
upload_docs()
|
||||
upload_user_manual()
|
||||
check_call('''rm -rf dist/* build/*''')
|
||||
|
Loading…
x
Reference in New Issue
Block a user