projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
190e8e2
)
getting version from git or failing
author
gcmalloc
<gcmalloc@gmail.com>
Wed, 28 Nov 2012 17:49:56 +0000
(18:49 +0100)
committer
gcmalloc
<gcmalloc@gmail.com>
Wed, 28 Nov 2012 17:49:56 +0000
(18:49 +0100)
setup.py
patch
|
blob
|
history
diff --git
a/setup.py
b/setup.py
index 3eccf50d8ff3545a0d2b0e3809cd9a8613d7d84c..d90856b9d295d0e14778e88866c8e7323c3adda5 100644
(file)
--- a/
setup.py
+++ b/
setup.py
@@
-5,15
+5,22
@@
try:
except ImportError:
sys.stderr.write("Cannot import py2exe")
import os
except ImportError:
sys.stderr.write("Cannot import py2exe")
import os
+import subprocess
-"""This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""
+"""The p2exe option will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package.
+ python setup.py py2exe
+ You can also build a zip executable with
+ python setup.py bdist --format=zip
+
+
+"""
# If run without args, build executables
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # conflict with wine-py2exe.sh
# If run without args, build executables
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # conflict with wine-py2exe.sh
-sys.path.append('./youtube_dl')
+
#
sys.path.append('./youtube_dl')
options = {
"bundle_files": 1,
options = {
"bundle_files": 1,
@@
-29,11
+36,10
@@
console = [{
}]
init_file = open('./youtube_dl/__init__.py')
}]
init_file = open('./youtube_dl/__init__.py')
-for line in init_file.readlines():
- if line.startswith('__version__'):
- version = line[11:].strip(" ='\n")
- break
-else:
+
+try:
+ version = subprocess.checkoutput(["git", "describe", "--abbrev=0", "--tags"])
+except:
version = ''
setup(name='youtube-dl',
version = ''
setup(name='youtube-dl',