Adding setup for pip packaging

main
Ben Busby 2020-05-06 17:24:18 -06:00
parent d01f56ea03
commit 9ca74397b4
6 changed files with 38 additions and 5 deletions

5
.gitignore vendored
View File

@ -5,3 +5,8 @@ __pycache__/
*.pem
config.json
test/static
# pip stuff
build/
dist/
*.egg-info/

View File

@ -5,4 +5,4 @@ before_install:
install:
- pip install -r requirements.txt
script:
- ./run test
- ./whoogle-search test

View File

@ -4,6 +4,6 @@ WORKDIR /usr/src/app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt
RUN chmod +x ./run
RUN chmod +x ./whoogle-search
CMD ["./run"]
CMD ["./whoogle-search"]

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
graft app/static
graft app/templates
global-exclude *.pyc

25
setup.py Normal file
View File

@ -0,0 +1,25 @@
import setuptools
long_description = open('README.md', 'r').read()
requirements = list(open('requirements.txt', 'r'))
setuptools.setup(
author='Ben Busby',
author_email='benbusby@protonmail.com',
name='whoogle-search',
version='0.1.0',
scripts=['whoogle-search'],
include_package_data=True,
install_requires=requirements,
description='Self-hosted, ad-free, privacy-respecting alternative to Google search',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/benbusby/whoogle-search',
packages=setuptools.find_packages(),
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
)

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Usage:
# ./run # Runs the full web app
# ./run test # Runs the testing suite
# ./whoogle-search # Runs the full web app
# ./whoogle-search test # Runs the testing suite
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"