refactor: migrate versioning to __version__.py and remove deprecated _version.py
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from .async_webcrawler import AsyncWebCrawler
|
from .async_webcrawler import AsyncWebCrawler
|
||||||
from .models import CrawlResult
|
from .models import CrawlResult
|
||||||
from ._version import __version__
|
from .__version__ import __version__
|
||||||
# __version__ = "0.3.73"
|
# __version__ = "0.3.73"
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ from .utils import (
|
|||||||
InvalidCSSSelectorError,
|
InvalidCSSSelectorError,
|
||||||
format_html
|
format_html
|
||||||
)
|
)
|
||||||
from ._version import __version__ as crawl4ai_version
|
from .__version__ import __version__ as crawl4ai_version
|
||||||
|
|
||||||
class AsyncWebCrawler:
|
class AsyncWebCrawler:
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import time
|
|
||||||
from bs4 import BeautifulSoup, Tag
|
from bs4 import BeautifulSoup, Tag
|
||||||
from typing import List, Tuple, Dict
|
from typing import List, Tuple, Dict
|
||||||
from rank_bm25 import BM25Okapi
|
from rank_bm25 import BM25Okapi
|
||||||
import nltk
|
|
||||||
from time import perf_counter
|
|
||||||
from html5lib import parse, treebuilders
|
|
||||||
from time import perf_counter
|
from time import perf_counter
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from bs4 import BeautifulSoup, NavigableString, Tag
|
from bs4 import BeautifulSoup, NavigableString, Tag
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
-r requirements.txt
|
|
||||||
pytest
|
|
||||||
pytest-asyncio
|
|
||||||
selenium
|
|
||||||
setuptools
|
|
||||||
@@ -10,3 +10,5 @@ requests~=2.26
|
|||||||
beautifulsoup4~=4.12
|
beautifulsoup4~=4.12
|
||||||
tf-playwright-stealth~=1.0
|
tf-playwright-stealth~=1.0
|
||||||
xxhash~=3.4
|
xxhash~=3.4
|
||||||
|
rank-bm25~=0.2
|
||||||
|
aiofiles~=24.0
|
||||||
2
setup.py
2
setup.py
@@ -28,7 +28,7 @@ __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file
|
|||||||
with open(os.path.join(__location__, "requirements.txt")) as f:
|
with open(os.path.join(__location__, "requirements.txt")) as f:
|
||||||
requirements = f.read().splitlines()
|
requirements = f.read().splitlines()
|
||||||
|
|
||||||
with open("crawl4ai/_version.py") as f:
|
with open("crawl4ai/__version__.py") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith("__version__"):
|
if line.startswith("__version__"):
|
||||||
version = line.split("=")[1].strip().strip('"')
|
version = line.split("=")[1].strip().strip('"')
|
||||||
|
|||||||
Reference in New Issue
Block a user