From 792232dcc52093360f28ec48e1222dc6c3d9640a Mon Sep 17 00:00:00 2001 From: Trevor Bossert <37596773+tabossert@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:18:14 -0700 Subject: [PATCH] Chore: move scarf to setup.py (#1569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also follows what I have seen as the recommend way to define a file package like this. Also bumps minor versions from pip compile Testing: `pip install -e .` Everything should build as normal `❯ pip install -e . Obtaining file:///Users/trevor/dev/unstructured Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Preparing editable metadata (pyproject.toml) ... done Collecting scarf@ https://packages.unstructured.io/scarf.tgz (from unstructured==0.10.17.dev16) Using cached https://packages.unstructured.io/scarf.tgz (1.1 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done` When new release goes out, I will test just plain pip install to verify that functionality still works --- requirements/base.in | 3 --- requirements/base.txt | 2 -- setup.py | 7 ++++++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements/base.in b/requirements/base.in index 2a0558154a..4a20b179c3 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -11,7 +11,4 @@ emoji dataclasses-json python-iso639 langdetect -# (Trevor): This is a simple hello world package that is used to track -# download count for this package using scarf. -https://packages.unstructured.io/scarf.tgz numpy \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt index 0cbe2afbf1..cfc1b241da 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -50,8 +50,6 @@ regex==2023.8.8 # via nltk requests==2.31.0 # via -r requirements/base.in -scarf @ https://packages.unstructured.io/scarf.tgz - # via -r requirements/base.in six==1.16.0 # via langdetect soupsieve==2.5 diff --git a/setup.py b/setup.py index cbde874f62..7b0b900c46 100644 --- a/setup.py +++ b/setup.py @@ -106,7 +106,12 @@ def load_requirements(file_list: Optional[Union[str, List[str]]] = None) -> List entry_points={ "console_scripts": ["unstructured-ingest=unstructured.ingest.main:main"], }, - install_requires=load_requirements(), + install_requires=[ + # (Trevor): This is a simple hello world package that is used to track + # download count for this package using scarf. + 'scarf @ https://packages.unstructured.io/scarf.tgz', + load_requirements() + ], extras_require={ # Document specific extra requirements "all-docs": all_doc_reqs,