Fix #3590 (calibre 0.6.13 source package is a tarbomb)

This commit is contained in:
Kovid Goyal 2009-09-25 11:41:12 -06:00
parent 6a31132868
commit 0c678d9f05
3 changed files with 3 additions and 30 deletions

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>libprs500</name>
<comment></comment>
<projects>
<project>ipython</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/calibre-pluginize/src</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

View File

@ -215,6 +215,7 @@ class Sdist(Command):
if not self.e(self.d(self.DEST)):
os.makedirs(self.d(self.DEST))
tdir = tempfile.mkdtemp()
tdir = self.j(tdir, 'calibre')
atexit.register(shutil.rmtree, tdir)
self.info('\tRunning bzr export...')
subprocess.check_call(['bzr', 'export', '--format', 'dir', tdir])
@ -237,8 +238,8 @@ class Sdist(Command):
shutil.copy2(f, dest)
self.info('\tCreating tarfile...')
subprocess.check_call(' '.join(['tar', '-czf', self.a(self.DEST), '*']),
cwd=tdir, shell=True)
subprocess.check_call(['tar', '-czf', self.a(self.DEST),
'calibre'], cwd=self.d(tdir))
def clean(self):
if os.path.exists(self.DEST):