Configure setup() using setup.cfg (#667)

Dependencies are not read from requirements.txt intentionally, so only
direct dependencies without version pinning are included.

Setuptools documentation:
https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
main
jan Anja 2022-02-26 03:29:54 +05:00 committed by GitHub
parent c3634a5135
commit 5069838e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 27 deletions

View File

@ -20,6 +20,7 @@ jobs:
python -m python -m
pip install pip install
build build
setuptools
--user --user
- name: Set dev timestamp - name: Set dev timestamp
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV

37
setup.cfg Normal file
View File

@ -0,0 +1,37 @@
[metadata]
name = whoogle-search
url = https://github.com/benbusby/whoogle-search
description = Self-hosted, ad-free, privacy-respecting metasearch engine
long_description = file: README.md
long_description_content_type = text/markdown
keywords = search, metasearch, flask, adblock, degoogle, privacy
author = Ben Busby
author_email = contact@benbusby.com
license = MIT
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent
[options]
packages = find:
include_package_data = True
install_requires=
beautifulsoup4
cryptography
Flask
Flask-Session
python-dotenv
requests
stem
waitress
[options.extras_require]
test =
pytest
python-dateutil
dev = pycodestyle
[options.entry_points]
console_scripts =
whoogle-search = app.routes:run_app

View File

@ -1,34 +1,8 @@
import os import os
import setuptools import setuptools
long_description = open('README.md', 'r').read()
requirements = list(open('requirements.txt', 'r'))
optional_dev_tag = '' optional_dev_tag = ''
if os.getenv('DEV_BUILD'): if os.getenv('DEV_BUILD'):
optional_dev_tag = '.dev' + os.getenv('DEV_BUILD') optional_dev_tag = '.dev' + os.getenv('DEV_BUILD')
setuptools.setup( setuptools.setup(version='0.7.1' + optional_dev_tag)
author='Ben Busby',
author_email='contact@benbusby.com',
name='whoogle-search',
version='0.7.1' + optional_dev_tag,
include_package_data=True,
install_requires=requirements,
description='Self-hosted, ad-free, privacy-respecting metasearch engine',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/benbusby/whoogle-search',
entry_points={
'console_scripts': [
'whoogle-search=app.routes:run_app',
]
},
packages=setuptools.find_packages(),
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
)