forked from tomquirk/linkedin-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
41 lines (34 loc) · 1.24 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
import setuptools
import ast
import re
from pathlib import Path
CURRENT_DIR = Path(__file__).parent
def get_long_description() -> str:
readme_md = CURRENT_DIR / "README.md"
with open(readme_md, encoding="utf8") as ld_file:
return ld_file.read()
def get_version() -> str:
black_py = CURRENT_DIR / "linkedin_api/__init__.py"
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
with open(black_py, "r", encoding="utf8") as f:
match = _version_re.search(f.read())
version = match.group("version") if match is not None else '"unknown"'
return str(ast.literal_eval(version))
setuptools.setup(
name="linkedin_api",
version=get_version(),
author="Tom Quirk",
author_email="[email protected]",
description="Python wrapper for the Linkedin API",
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/tomquirk/linkedin-api",
license="MIT",
packages=setuptools.find_packages(),
install_requires=["requests", "beautifulsoup4", "lxml"],
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
),
)