Skip to content

Commit

Permalink
从Effect.py中获取版本号。
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricporter committed Jul 30, 2012
1 parent 91f7017 commit a9c0219
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions EffectLab/Effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import math, operator
from math import sqrt, sin, cos, atan2

VERSION = "1.0.0"

# 尝试加载C语言实现的部分
try:
import EffectLabCore as core
Expand Down
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,25 @@
#

from distutils.core import setup, Extension
import re

NAME = "EffectLab"
DESCRIPTION = "Python Image Processing Effect Lab"
AUTHOR = "Hua Liang [Stupid ET]"
HOMEPAGE = "http://everet.org/2012/07/effectlab.html"
DOWNLOAD_URL = "https://github.com/cedricporter/EffectLab/downloads"

def find_version(filename):
for line in open(filename).readlines():
m = re.search("VERSION\s*=\s*\"([^\"]+)\"", line)
if m:
return m.group(1)
return None

VERSION = find_version("EffectLab/Effect.py")

setup(name = NAME,
version = '1.0',
version = VERSION,
author = 'Hua Liang [Stupid ET]',
author_email = '[email protected]',
url = HOMEPAGE,
Expand Down

0 comments on commit a9c0219

Please sign in to comment.