-
Notifications
You must be signed in to change notification settings - Fork 263
Expand file tree
/
Copy pathsetup.py
More file actions
98 lines (83 loc) · 2.71 KB
/
setup.py
File metadata and controls
98 lines (83 loc) · 2.71 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env python3
from __future__ import annotations
import io
import os
from pathlib import Path
from setuptools import find_packages, setup
ROOT = Path(__file__).resolve().parent
def read_text(path: Path) -> str:
with io.open(path, encoding="utf-8") as f:
return f.read()
def read_requirements(path: Path) -> list[str]:
reqs: list[str] = []
for raw in read_text(path).splitlines():
line = raw.strip()
if not line or line.startswith("#"):
continue
# Keep environment markers/version pins; drop inline comments.
reqs.append(line.split("#", 1)[0].strip())
return reqs
about: dict[str, str] = {}
exec(read_text(ROOT / "Scweet" / "__version__.py"), about)
version = about["__version__"]
def read_text_optional(path: Path) -> str | None:
try:
return read_text(path)
except FileNotFoundError:
return None
long_description = (
read_text_optional(ROOT / "README.md")
or read_text_optional(ROOT / "DOCUMENTATION.md")
or ""
)
setup(
name="Scweet",
version=version,
license="MIT",
description="Scrape tweets, profiles, followers and more from Twitter/X — no API key needed",
long_description=long_description,
long_description_content_type="text/markdown",
author="Yassine AIT JEDDI",
author_email="aitjeddiyassine@gmail.com",
url="https://github.com/Altimis/Scweet",
download_url=f"https://github.com/Altimis/Scweet/archive/v{version}.tar.gz",
keywords=[
"twitter",
"x",
"scraper",
"twitter-scraper",
"x-scraper",
"tweets",
"tweet-search",
"twitter-search",
"followers",
"following",
"twitter-api-alternative",
"graphql",
"web-scraping",
"social-media",
"data-collection",
"python",
],
packages=find_packages(include=("Scweet", "Scweet.*")),
include_package_data=True,
package_data={"Scweet": ["default_manifest.json"]},
install_requires=read_requirements(ROOT / "requirements.txt"),
entry_points={
"console_scripts": ["scweet=Scweet.cli:main"],
},
python_requires=">=3.9",
license_files=[],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
)