morss/setup.py

60 lines
1.8 KiB
Python
Raw Normal View History

from datetime import datetime
2020-04-14 15:36:42 +00:00
from glob import glob
2021-09-08 19:29:56 +00:00
from setuptools import setup
2023-06-27 20:30:25 +00:00
def get_version():
with open('morss/__init__.py', 'r+') as file:
lines = file.readlines()
# look for hard coded version number
for i in range(len(lines)):
if lines[i].startswith('__version__'):
version = lines[i].split('"')[1]
break
# create (& save) one if none found
if version == '':
version = datetime.now().strftime('%Y%m%d.%H%M')
lines[i] = '__version__ = "' + version + '"\n'
file.seek(0)
file.writelines(lines)
# return version number
return version
package_name = 'morss'
2020-04-14 15:36:42 +00:00
setup(
2020-04-14 15:36:42 +00:00
name = package_name,
2023-06-27 20:30:25 +00:00
version = get_version(),
2020-04-14 15:36:42 +00:00
description = 'Get full-text RSS feeds',
2021-12-05 17:59:14 +00:00
long_description = open('README.md').read(),
2021-12-05 18:14:57 +00:00
long_description_content_type = 'text/markdown',
2021-12-05 17:48:47 +00:00
author = 'pictuga',
2021-12-05 17:04:24 +00:00
author_email = 'contact@pictuga.com',
2020-04-14 15:36:42 +00:00
url = 'http://morss.it/',
2021-12-09 23:44:18 +00:00
project_urls = {
'Source': 'https://git.pictuga.com/pictuga/morss',
'Bug Tracker': 'https://github.com/pictuga/morss/issues',
},
2020-04-14 15:36:42 +00:00
license = 'AGPL v3',
packages = [package_name],
2021-09-11 10:12:51 +00:00
install_requires = ['lxml', 'bs4', 'python-dateutil', 'chardet'],
2021-12-04 13:26:40 +00:00
extras_require = {
'full': ['redis', 'diskcache', 'gunicorn', 'setproctitle'],
2023-06-23 23:50:12 +00:00
'dev': ['pylint', 'pyenchant', 'pytest', 'pytest-cov'],
2021-12-04 13:26:40 +00:00
},
2021-12-09 23:44:29 +00:00
python_requires = '>=2.7',
package_data = {package_name: ['feedify.ini']},
2020-04-14 15:36:42 +00:00
data_files = [
2020-04-14 17:34:12 +00:00
('share/' + package_name, ['README.md', 'LICENSE']),
('share/' + package_name + '/www', glob('www/*.*')),
2020-04-14 15:36:42 +00:00
],
entry_points = {
2022-01-08 15:10:51 +00:00
'console_scripts': [package_name + '=' + package_name + '.__main__:main'],
},
scripts = ['morss-helper'],
)