Skip to content

Commit 35b34a9

Browse files
jecarrKadeMorton
authored andcommitted
Removed searx-imports in setup.py
1 parent b2a7f09 commit 35b34a9

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

setup.py

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
# -*- coding: utf-8 -*-
22
"""Installer for Searx package."""
33

4-
from setuptools import setup
5-
from setuptools import find_packages
6-
74
import os
85
import sys
96

10-
from searx.version import VERSION_STRING
11-
from searx import brand
7+
from setuptools import find_packages, setup
8+
9+
10+
version_ns = {}
11+
with open(os.path.join('searx', 'version.py')) as f:
12+
exec(f.read(), version_ns)
13+
VERSION_STRING = version_ns.get('VERSION_STRING', '')
14+
15+
brand = {}
16+
with open(os.path.join('utils', 'brand.env')) as f:
17+
for line in f:
18+
line = line.strip()
19+
20+
if not line or line.startswith('#'):
21+
continue
22+
23+
if line.startswith('export '):
24+
line = line[len('export '):]
25+
26+
if '=' in line:
27+
key, val = line.split('=', 1)
28+
key = key.strip()
29+
val = val.strip().strip("'").strip('"')
30+
brand[key] = val
1231

1332
with open('README.rst', encoding='utf-8') as f:
1433
long_description = f.read()
@@ -24,10 +43,10 @@
2443
version=VERSION_STRING,
2544
description="A privacy-respecting, hackable metasearch engine",
2645
long_description=long_description,
27-
url=brand.DOCS_URL,
46+
url=brand.get("DOCS_URL", ""),
2847
project_urls={
29-
"Code": brand.GIT_URL,
30-
"Issue tracker": brand.ISSUE_URL
48+
"Code": brand.get("GIT_URL", ""),
49+
"Issue tracker": brand.get("ISSUE_URL", ""),
3150
},
3251
classifiers=[
3352
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)