2013-08-01 11:11:48 +00:00
|
|
|
import codecs
|
|
|
|
|
import re
|
|
|
|
|
from os import path
|
2022-08-09 19:17:24 +00:00
|
|
|
|
|
|
|
|
from setuptools import find_packages, setup
|
2008-10-28 09:46:55 +00:00
|
|
|
|
|
|
|
|
|
2013-08-01 11:11:48 +00:00
|
|
|
def read(*parts):
|
|
|
|
|
filename = path.join(path.dirname(__file__), *parts)
|
2022-07-16 20:50:05 +00:00
|
|
|
with codecs.open(filename, encoding="utf-8") as fp:
|
2013-08-01 11:11:48 +00:00
|
|
|
return fp.read()
|
2008-10-28 09:46:55 +00:00
|
|
|
|
|
|
|
|
|
2013-08-01 11:11:48 +00:00
|
|
|
def find_version(*file_paths):
|
|
|
|
|
version_file = read(*file_paths)
|
2022-07-16 20:50:05 +00:00
|
|
|
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
|
2013-08-01 11:11:48 +00:00
|
|
|
if version_match:
|
|
|
|
|
return version_match.group(1)
|
|
|
|
|
raise RuntimeError("Unable to find version string.")
|
2008-10-28 09:46:55 +00:00
|
|
|
|
2020-01-04 16:37:01 +00:00
|
|
|
|
2008-10-28 09:46:55 +00:00
|
|
|
setup(
|
2022-07-16 20:50:05 +00:00
|
|
|
packages=find_packages(exclude=["tests"]),
|
2013-03-04 10:33:40 +00:00
|
|
|
package_data={
|
2022-07-16 20:50:05 +00:00
|
|
|
"avatar": [
|
|
|
|
|
"templates/notification/*/*.*",
|
|
|
|
|
"templates/avatar/*.html",
|
|
|
|
|
"locale/*/LC_MESSAGES/*",
|
|
|
|
|
"media/avatar/img/default.jpg",
|
2009-04-23 18:57:15 +00:00
|
|
|
],
|
|
|
|
|
},
|
2008-10-28 09:46:55 +00:00
|
|
|
zip_safe=False,
|
|
|
|
|
)
|