Hotfix: Move language/country json to app dir

Pip installs of whoogle search were missing access to the misc/ folder,
which previously contained the language and country json files. These
have been moved to app/misc, and the previous root level misc/ was
renamed to config/ (since it now only contains the tor config files).

Bump to 0.3.1.
pull/193/head v0.3.1
Ben Busby 3 years ago
parent 329c38efb0
commit 0a6575d219
No known key found for this signature in database
GPG Key ID: 3B08611DF6E62ED2

@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \
libffi-dev \ libffi-dev \
tor tor
COPY misc/tor/torrc /etc/tor/torrc COPY config/tor/torrc /etc/tor/torrc
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
@ -50,4 +50,4 @@ COPY . .
EXPOSE $EXPOSE_PORT EXPOSE $EXPOSE_PORT
CMD misc/tor/start-tor.sh & ./run CMD config/tor/start-tor.sh & ./run

@ -1,4 +1,5 @@
graft app/static graft app/static
graft app/templates graft app/templates
graft app/misc
include requirements.txt include requirements.txt
global-exclude *.pyc global-exclude *.pyc

@ -14,14 +14,14 @@ app.default_key_set = generate_user_keys()
app.no_cookie_ips = [] app.no_cookie_ips = []
app.config['SECRET_KEY'] = os.urandom(32) app.config['SECRET_KEY'] = os.urandom(32)
app.config['SESSION_TYPE'] = 'filesystem' app.config['SESSION_TYPE'] = 'filesystem'
app.config['VERSION_NUMBER'] = '0.3.0' app.config['VERSION_NUMBER'] = '0.3.1'
app.config['APP_ROOT'] = os.getenv( app.config['APP_ROOT'] = os.getenv(
'APP_ROOT', 'APP_ROOT',
os.path.dirname(os.path.abspath(__file__))) os.path.dirname(os.path.abspath(__file__)))
app.config['LANGUAGES'] = json.load(open( app.config['LANGUAGES'] = json.load(open(
os.path.join(app.config['APP_ROOT'], '../misc/languages.json'))) os.path.join(app.config['APP_ROOT'], 'misc/languages.json')))
app.config['COUNTRIES'] = json.load(open( app.config['COUNTRIES'] = json.load(open(
os.path.join(app.config['APP_ROOT'], '../misc/countries.json'))) os.path.join(app.config['APP_ROOT'], 'misc/countries.json')))
app.config['STATIC_FOLDER'] = os.getenv( app.config['STATIC_FOLDER'] = os.getenv(
'STATIC_FOLDER', 'STATIC_FOLDER',
os.path.join(app.config['APP_ROOT'], 'static')) os.path.join(app.config['APP_ROOT'], 'static'))

@ -8,10 +8,10 @@ setuptools.setup(
author='Ben Busby', author='Ben Busby',
author_email='benbusby@protonmail.com', author_email='benbusby@protonmail.com',
name='whoogle-search', name='whoogle-search',
version='0.3.0', version='0.3.1',
include_package_data=True, include_package_data=True,
install_requires=requirements, install_requires=requirements,
description='Self-hosted, ad-free, privacy-respecting Google metasearch engine', description='Self-hosted, ad-free, privacy-respecting metasearch engine',
long_description=long_description, long_description=long_description,
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
url='https://github.com/benbusby/whoogle-search', url='https://github.com/benbusby/whoogle-search',

@ -0,0 +1 @@
../app/misc/
Loading…
Cancel
Save