aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MgaRepo/util.py6
-rwxr-xr-xsetup.py37
2 files changed, 20 insertions, 23 deletions
diff --git a/MgaRepo/util.py b/MgaRepo/util.py
index b8dedaa..519c199 100644
--- a/MgaRepo/util.py
+++ b/MgaRepo/util.py
@@ -20,15 +20,15 @@ def commands_getstatusoutput(cmd):
"""Return (status, output) of executing cmd in a shell."""
pipe = subprocess.Popen('{ ' + cmd + '; } 2>&1', stdin = subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines = True, shell = True)
of = pipe.stdout.fileno()
- text = ''
+ text = b''
pipe.stdin.close()
while True:
- text += os.read(of,8192).decode('utf8')
+ text += os.read(of,8192)
status = pipe.poll()
if status is not None or text == '':
break
if text[-1:] == '\n': text = text[:-1]
- return status, text
+ return status, text.decode('utf8')
def execcmd(*cmd, **kwargs):
cmdstr = " ".join(cmd)
diff --git a/setup.py b/setup.py
index 6a5c853..3ba8ede 100755
--- a/setup.py
+++ b/setup.py
@@ -3,31 +3,28 @@ from distutils.core import setup
import sys
import re
-verpat = re.compile("VERSION *= *\"(.*)\"")
+verpat = re.compile('VERSION *= *"(.*)"')
data = open("mgarepo").read()
m = verpat.search(data)
if not m:
sys.exit("error: can't find VERSION")
VERSION = m.group(1)
-setup(name="mgarepo",
- version = VERSION,
- description = "Tools for Mageia repository access and management",
- author = "Gustavo Niemeyer",
- author_email = "gustavo@niemeyer.net",
- url = "https://wiki.mageia.org/en/Mgarepo",
- license = "GPL",
- long_description = """Tools for Mageia repository access and management, based on repsys.""",
- packages = ["MgaRepo", "MgaRepo.cgi", "MgaRepo.commands",
- "MgaRepo.plugins"],
- scripts = ["mgarepo", "mgarepo-ssh"],
- data_files = [
- ("/usr/share/mgarepo/",
- ["create-srpm"]),
- ("share/bash-completion/completions",
- ["bash-completion/mgarepo"]),
- ("/etc/", ["mgarepo.conf"]),
- ("share/man/man8/", ["mgarepo.8"])]
- )
+setup(
+ name="mgarepo",
+ version=VERSION,
+ description="Tools for Mageia repository access and management",
+ author="Gustavo Niemeyer",
+ author_email="gustavo@niemeyer.net",
+ url="https://wiki.mageia.org/en/Mgarepo",
+ license="GPL",
+ long_description="""Tools for Mageia repository access and management, based on repsys.""",
+ packages=["MgaRepo", "MgaRepo.cgi", "MgaRepo.commands", "MgaRepo.plugins"],
+ scripts=["mgarepo", "mgarepo-ssh"],
+ data_files=[
+ ("share/bash-completion/completions", ["bash-completion/mgarepo"]),
+ ("share/man/man8/", ["mgarepo.8"]),
+ ],
+)
# vim:ts=4:sw=4:et