-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
46 lines (38 loc) · 1.39 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import re
import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# Function to read version from __version__.py
def get_version():
version_file = HERE / "minsearch" / "__version__.py"
version_text = version_file.read_text()
# Extract the version number using a regular expression
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_text, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# This call to setup() does all the work
setup(
name="minsearch",
version=get_version(),
description="Minimalistic text search engine that uses sklearn and pandas",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/alexeygrigorev/minsearch",
author="Alexey Grigorev",
author_email="[email protected]",
license="WTFPL",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
],
packages=["minsearch"],
include_package_data=True,
install_requires=["pandas", "scikit-learn"],
)