-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a 'User-Agent' header of
insta-science/<version>
. (#21)
- Loading branch information
Showing
11 changed files
with
84 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# Build artifacts dirs. | ||
/*.egg-info/ | ||
/build/ | ||
|
||
# Python bytecode. | ||
__pycache__/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
python/insta_science/version.py → python/insta_science/_internal/version.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2024 Science project contributors. | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
__version__ = "0.4.3" | ||
__version__ = "0.4.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 2025 Science project contributors. | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
import atexit | ||
import shutil | ||
import tempfile | ||
from pathlib import Path | ||
|
||
from setuptools import setup | ||
|
||
_BUILD_DIR: Path | None = None | ||
|
||
|
||
def ensure_unique_build_dir() -> Path: | ||
global _BUILD_DIR | ||
if _BUILD_DIR is None: | ||
_build_dir = Path(tempfile.mkdtemp(prefix="insta-science-dist-build.")) | ||
atexit.register(shutil.rmtree, _build_dir, ignore_errors=True) | ||
_BUILD_DIR = _build_dir | ||
return _BUILD_DIR | ||
|
||
|
||
def unique_build_dir(name) -> str: | ||
path = ensure_unique_build_dir() / name | ||
path.mkdir() | ||
return str(path) | ||
|
||
|
||
if __name__ == "__main__": | ||
setup( | ||
# The `egg_info --egg-base`, `build --build-base` and `bdist_wheel --bdist-dir` setup.py | ||
# sub-command options we pass below work around the otherwise default `<CWD>/build/` | ||
# directory for all three which defeats concurrency in tests. | ||
options={ | ||
"egg_info": {"egg_base": unique_build_dir("egg_base")}, | ||
"build": {"build_base": unique_build_dir("build_base")}, | ||
"bdist_wheel": {"bdist_dir": unique_build_dir("bdist_dir")}, | ||
} | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.