Updated to use pkg_resources
Added RPM data
This commit is contained in:
parent
8a0241b934
commit
13a6e8a7af
4 changed files with 8 additions and 16 deletions
3
setup.cfg
Normal file
3
setup.cfg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[bdist_rpm]
|
||||||
|
release: 1
|
||||||
|
requires: python3 python3-urllib3 python3-gobject gtk3 dvdauthor vcdimager python3-setuptools
|
||||||
15
setup.py
15
setup.py
|
|
@ -52,25 +52,12 @@ def compile_translations():
|
||||||
|
|
||||||
compile_translations()
|
compile_translations()
|
||||||
|
|
||||||
current_version = "1.0.0"
|
|
||||||
|
|
||||||
config_data = open("src/devedeng/configuration_data.py","r")
|
|
||||||
for line in config_data:
|
|
||||||
line = line.strip()
|
|
||||||
if (line.startswith("self.version")):
|
|
||||||
pos = line.find('"')
|
|
||||||
if pos == -1:
|
|
||||||
continue
|
|
||||||
current_version = line[pos+1:-1].replace(" ","").lower().replace("beta",".beta")
|
|
||||||
break
|
|
||||||
config_data.close()
|
|
||||||
|
|
||||||
#here = os.path.abspath(os.path.dirname(__file__))
|
#here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='devedeng',
|
name='devedeng',
|
||||||
|
|
||||||
version=current_version,
|
version='1.0',
|
||||||
|
|
||||||
description='A video DVD creator',
|
description='A video DVD creator',
|
||||||
long_description = "A program that allows to create video DVDs",
|
long_description = "A program that allows to create video DVDs",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
import os
|
import os
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
class configuration(GObject.GObject):
|
class configuration(GObject.GObject):
|
||||||
|
|
||||||
|
|
@ -35,7 +36,8 @@ class configuration(GObject.GObject):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
GObject.GObject.__init__(self)
|
GObject.GObject.__init__(self)
|
||||||
self.version = "0.1.0 Beta 12"
|
self.version = str(pkg_resources.require("devedeng")[0].version)
|
||||||
|
print("Version: "+self.version)
|
||||||
|
|
||||||
def fill_config(self):
|
def fill_config(self):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
Depends = python3, python-support, python-urllib3, python-gi, libgtk-3-0 (>=2.16.0), ffmpeg (>= 7:1.2.6) | libav-tools(>= 6:9.16), mplayer, mpv | vlc, dvdauthor, mkisofs | genisoimage, vcdimager, libvorbis0a, libvorbisfile3
|
Depends = python3, python-support, python3-urllib3, python3-gi, libgtk-3-0 (>=2.16.0), ffmpeg (>= 7:1.2.6) | libav-tools(>= 6:9.16), mplayer, mpv | vlc, dvdauthor, mkisofs | genisoimage, vcdimager, libvorbis0a, libvorbisfile3, python3-pkg-resources
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue