Commit 3b6ef046 authored by Dan Pascu's avatar Dan Pascu

Added __info__ module

parent f7947526
"""Package information"""
__project__ = "blink"
__summary__ = "Blink Qt"
__webpage__ = "http://icanblink.com/"
__version__ = "1.4.2"
__date__ = "December 4th 2015"
__author__ = "AG Projects"
__email__ = "support@ag-projects.com"
__license__ = "GPLv3"
__copyright__ = "Copyright 2010-2016 {}".format(__author__)
__version__ = '1.4.2'
__date__ = 'December 4th 2015'
import os
import sys
import sip
......@@ -34,6 +31,8 @@ from sipsimple.storage import FileStorage
from sipsimple.threading import run_in_twisted_thread
from sipsimple.threading.green import run_in_green_thread
from blink.__info__ import __project__, __summary__, __webpage__, __version__, __date__, __author__, __email__, __license__, __copyright__
try:
from blink import branding
except ImportError:
......
#!/usr/bin/env python
import os
import re
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
def get_version():
return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('blink/__init__.py').read()).group('version')
class PackageInfo(object):
def __init__(self, info_file):
with open(info_file) as f:
exec(f.read(), self.__dict__)
self.__dict__.pop('__builtins__', None)
def __getattribute__(self, name): # this is here to silence the IDE about missing attributes
return super(PackageInfo, self).__getattribute__(name)
def find_packages(toplevel):
return [directory.replace(os.path.sep, '.') for directory, subdirs, files in os.walk(toplevel) if '__init__.py' in files]
def find_packages(root):
return [directory.replace(os.path.sep, '.') for directory, sub_dirs, files in os.walk(root) if '__init__.py' in files]
def list_resources(directory, destination_directory):
return [(dir.replace(directory, destination_directory), [os.path.join(dir, file) for file in files]) for dir, subdirs, files in os.walk(directory)]
setup(name = "blink",
version = get_version(),
author = "AG Projects",
author_email = "support@ag-projects.com",
url = "http://icanblink.com",
description = "Blink Qt",
long_description = "A state of the art, easy to use SIP client",
platforms = ["Platform Independent"],
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: GNU General Public License 3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python"
],
packages = find_packages('blink'),
ext_modules = cythonize([Extension(name="blink.screensharing._rfb", sources=["blink/screensharing/_rfb.pyx"], libraries=["vncclient"])]),
data_files = list_resources('resources', destination_directory='share/blink'),
scripts = ['bin/blink']
)
return [(directory.replace(directory, destination_directory), [os.path.join(directory, file) for file in files]) for directory, sub_dirs, files in os.walk(directory)]
package_info = PackageInfo(os.path.join('blink', '__info__.py'))
package_info.__description__ = "A state of the art, easy to use SIP client"
setup(
name=package_info.__project__,
version=package_info.__version__,
description=package_info.__summary__,
long_description=package_info.__description__,
license=package_info.__license__,
url=package_info.__webpage__,
author=package_info.__author__,
author_email=package_info.__email__,
platforms=["Platform Independent"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: GNU General Public License 3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python"
],
packages=find_packages('blink'),
ext_modules=cythonize([Extension(name="blink.screensharing._rfb", sources=["blink/screensharing/_rfb.pyx"], libraries=["vncclient"])]),
data_files=list_resources('resources', destination_directory='share/blink'),
scripts=['bin/blink']
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment