mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-11 03:50:45 +01:00
![James Lu](/assets/img/avatar_default.png)
This makes 'reload' after commit impossible, for example, because each version is installed in a separate folder. Also, versions from 'git describe' aren't compatible with PEP 440. (cherry picked from commit bda39b48384fce4ff5b35ff224fe6686d326e25a)
80 lines
2.3 KiB
Python
80 lines
2.3 KiB
Python
"""Setup module for PyLink IRC Services."""
|
|
|
|
try:
|
|
from setuptools import setup, find_packages
|
|
except ImportError:
|
|
raise ImportError("Please install Setuptools and try again.")
|
|
from codecs import open
|
|
import subprocess
|
|
from os import path
|
|
|
|
# Get version from Git tags.
|
|
with open('VERSION', encoding='utf-8') as f:
|
|
version = f.read().strip()
|
|
|
|
try:
|
|
real_version = subprocess.check_output(['git', 'describe', '--tags']).decode('utf-8').strip()
|
|
except Exception as e:
|
|
print('ERROR: Failed to get Git version from "git describe --tags": %s: %s' % (type(e).__name__, e))
|
|
real_version = version + '-dirty'
|
|
|
|
# Write the version to disk.
|
|
with open('__init__.py', 'w') as f:
|
|
f.write('# Automatically generated by setup.py\n')
|
|
f.write('__version__ = %r\n' % version)
|
|
f.write('real_version = %r\n' % real_version)
|
|
|
|
curdir = path.abspath(path.dirname(__file__))
|
|
|
|
# FIXME: Convert markdown to RST
|
|
with open(path.join(curdir, 'README.md'), encoding='utf-8') as f:
|
|
long_description = f.read()
|
|
|
|
setup(
|
|
name='pylinkirc',
|
|
version=version,
|
|
|
|
description='PyLink IRC Services',
|
|
long_description=long_description,
|
|
|
|
url='https://github.com/GLolol/PyLink',
|
|
|
|
# Author details
|
|
author='James Lu',
|
|
author_email='GLolol@overdrivenetworks.com',
|
|
|
|
# Choose your license
|
|
license='MPL 2.0',
|
|
|
|
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
classifiers=[
|
|
'Development Status :: 3 - Alpha',
|
|
|
|
'Intended Audience :: Developers',
|
|
'Intended Audience :: System Administrators',
|
|
'Topic :: Communications :: Chat :: Internet Relay Chat',
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.4',
|
|
'Programming Language :: Python :: 3.5',
|
|
],
|
|
|
|
keywords='IRC services chat',
|
|
install_requires=['pyyaml', 'ircmatch'],
|
|
|
|
# Folders (packages of code)
|
|
packages=['pylinkirc', 'pylinkirc.protocols', 'pylinkirc.plugins', 'pylinkirc.coremods'],
|
|
|
|
# Data files
|
|
package_data={
|
|
'': ['example-conf.yml'],
|
|
},
|
|
|
|
package_dir = {'pylinkirc': '.'},
|
|
|
|
# Executable scripts
|
|
scripts=["pylink"],
|
|
)
|