Skip to content

Commit 1a62eb9

Browse files
committed
set scripts version to master
1 parent 10f86dd commit 1a62eb9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@
2020
4. Build both the sources and the wheel. Do not change anything in setup.py between
2121
creating the wheel and the source distribution (obviously).
2222
23+
First pin the SCRIPTS_VERSION to VERSION in __init__.py (but don't commit this change)
24+
2325
For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
2426
(this will build a wheel for the python version you use to build it).
2527
2628
For the sources, run: "python setup.py sdist"
2729
You should now have a /dist directory with both .whl and .tar.gz source versions.
2830
31+
Then change the SCRIPTS_VERSION back to to "master" in __init__.py (but don't commit this change)
32+
2933
5. Check that everything looks correct by uploading the package to the pypi test server:
3034
3135
twine upload dist/* -r pypitest

src/nlp/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@
5555
"To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition.\n"
5656
"If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`."
5757
)
58+
59+
SCRIPTS_VERIONS = "master"

src/nlp/utils/file_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ def head_hf_s3(identifier: str, filename: str, use_cdn=False, dataset=True) -> r
201201

202202

203203
def hf_github_url(path: str, name: str, dataset=True, version: Optional[str] = None) -> str:
204-
from .. import __version__
204+
from .. import SCRIPTS_VERIONS
205205

206-
version = version or os.getenv("HF_SCRIPTS_VERSION", __version__)
206+
version = version or os.getenv("HF_SCRIPTS_VERSION", SCRIPTS_VERIONS)
207207
if dataset:
208208
return REPO_DATASETS_URL.format(version=version, path=path, name=name)
209209
else:

0 commit comments

Comments
 (0)