Compare commits

..

No commits in common. "28e8089316ac0aa082f522cbbfb7e90c986fdce4" and "b2dcbd83687ff15436718384799813d340b5c90f" have entirely different histories.

6 changed files with 13 additions and 15 deletions

5
MANIFEST.in Normal file
View File

@ -0,0 +1,5 @@
include MANIFEST.in gcp.1
global-include *.py
global-include *.po *.mo
global-include CHANGELOG COPYING* README*
global-exclude *.un~ *.swp

View File

@ -59,7 +59,6 @@ complete the installation (Debian packages names, but you get the idea):
- libdbus-glib-1-dev
- libgirepository1.0-dev
- libcairo2-dev
- python3-cairo-dev
On Debian-based systems
-----------------------

11
gcp
View File

@ -317,15 +317,13 @@ class GCP():
def __copyNextFile(self):
"""Takes the last file in the list and launches the copy using glib
io_watch event.
@return: True a file was added, False otherwise."""
io_watch event."""
if not self.copy_list:
# Nothing left to copy, we quit
if self.progress:
self.__pbar_finish()
self.journal.showErrors()
self.loop.quit()
return False
source_file, dest_path, options = self.copy_list.pop()
self.journal.startFile(source_file)
@ -335,7 +333,7 @@ class GCP():
self.journal.copyFailed()
self.journal.error("can't open source")
self.journal.closeFile()
return True
return
filename = os.path.basename(source_file)
assert(filename)
@ -350,7 +348,7 @@ class GCP():
self.journal.error("already exists")
self.journal.closeFile()
source_fd.close()
return True
return
try:
dest_fd = open(dest_file, 'wb')
@ -359,7 +357,7 @@ class GCP():
self.journal.error("can't open dest")
self.journal.closeFile()
source_fd.close()
return True
return
GObject.io_add_watch(source_fd, GObject.IO_IN,self._copyFile,
(dest_fd, options),
@ -367,7 +365,6 @@ class GCP():
if not self.progress:
info(_("COPYING %(source)s ==> %(dest)s")
% {"source":source_file, "dest":dest_file})
return True
def __copyFailed(self, reason, source_fd, dest_fd):
"""Write the failure in the journal and close files descriptors"""

View File

@ -1,10 +1,10 @@
#!/usr/bin/env python3
import setuptools
from setuptools import setup
name = 'gcp'
setuptools.setup(
setup(
name=name,
version='0.2.0',
url='https://code.lm7.fr/mcy/gcp',
@ -36,15 +36,12 @@ setuptools.setup(
'Topic :: Utilities',
],
scripts=['gcp'],
# entry_points={
# 'console_scripts': ['gcp=gcp:main'],
# },
data_files=[
('share/locale/fr/LC_MESSAGES', ['i18n/fr/LC_MESSAGES/gcp.mo']),
('share/man/man1', ["gcp.1"]),
('share/doc/%s' % name, ['CHANGELOG', 'LICENSE.txt', 'README.md']),
('share/doc/%s' % name, ['COPYING', 'README.md']),
],
scripts=['gcp'],
install_requires=['PyGObject', 'dbus-python'],
python_requires='>=3',
)