Skip to content

Commit 1acc67d

Browse files
authored
Tune up setup.py a little to provide [full] and [devel] installation schemes (#1228)
* Define [full] extra_requires for a full installation * Add [devel] extras_require to facilitate setup of development environment
1 parent 95eb5f9 commit 1acc67d

File tree

2 files changed

+44
-24
lines changed

2 files changed

+44
-24
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@ A specification for pythonic filesystems.
1212
```bash
1313
pip install fsspec
1414
```
15-
or
15+
16+
would install the base fsspec. Various optionally supported features might require specification of custom
17+
extra require, e.g. `pip install fsspec[ssh]` will install dependencies for `ssh` backends support.
18+
Use `pip install fsspec[full]` for installation of all known extra dependencies.
19+
20+
Up-to-date package also provided through conda-forge distribution:
21+
1622
```bash
1723
conda install -c conda-forge fsspec
1824
```
1925

26+
2027
## Purpose
2128

2229
To produce a template or specification for a file-system interface, that specific implementations should follow,

setup.py

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,41 @@
99
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
1010
long_description = f.read()
1111

12+
extras_require = {
13+
"entrypoints": [],
14+
"abfs": ["adlfs"],
15+
"adl": ["adlfs"],
16+
"dask": ["dask", "distributed"],
17+
"dropbox": ["dropboxdrivefs", "requests", "dropbox"],
18+
"gcs": ["gcsfs"],
19+
"git": ["pygit2"],
20+
"github": ["requests"],
21+
"gs": ["gcsfs"],
22+
"hdfs": ["pyarrow >= 1"],
23+
"arrow": ["pyarrow >= 1"],
24+
"http": ["requests", "aiohttp !=4.0.0a0, !=4.0.0a1"],
25+
"sftp": ["paramiko"],
26+
"s3": ["s3fs"],
27+
"oci": ["ocifs"],
28+
"smb": ["smbprotocol"],
29+
"ssh": ["paramiko"],
30+
"fuse": ["fusepy"],
31+
"libarchive": ["libarchive-c"],
32+
"gui": ["panel"],
33+
"tqdm": ["tqdm"],
34+
}
35+
# To simplify full installation
36+
extras_require["full"] = sorted(set(sum(extras_require.values(), [])))
37+
38+
extras_require["devel"] = [
39+
"pytest",
40+
"pytest-cov",
41+
# might want to add other optional depends which are used exclusively
42+
# in the tests or not listed/very optional for other extra depends, e.g.
43+
# 'pyftpdlib',
44+
# 'fastparquet',
45+
]
46+
1247
setup(
1348
name="fsspec",
1449
version=versioneer.get_version(),
@@ -38,28 +73,6 @@
3873
packages=["fsspec", "fsspec.implementations"],
3974
python_requires=">=3.8",
4075
install_requires=open("requirements.txt").read().strip().split("\n"),
41-
extras_require={
42-
"entrypoints": [],
43-
"abfs": ["adlfs"],
44-
"adl": ["adlfs"],
45-
"dask": ["dask", "distributed"],
46-
"dropbox": ["dropboxdrivefs", "requests", "dropbox"],
47-
"gcs": ["gcsfs"],
48-
"git": ["pygit2"],
49-
"github": ["requests"],
50-
"gs": ["gcsfs"],
51-
"hdfs": ["pyarrow >= 1"],
52-
"arrow": ["pyarrow >= 1"],
53-
"http": ["requests", "aiohttp !=4.0.0a0, !=4.0.0a1"],
54-
"sftp": ["paramiko"],
55-
"s3": ["s3fs"],
56-
"oci": ["ocifs"],
57-
"smb": ["smbprotocol"],
58-
"ssh": ["paramiko"],
59-
"fuse": ["fusepy"],
60-
"libarchive": ["libarchive-c"],
61-
"gui": ["panel"],
62-
"tqdm": ["tqdm"],
63-
},
76+
extras_require=extras_require,
6477
zip_safe=False,
6578
)

0 commit comments

Comments
 (0)