summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-huggingface.spec216
-rw-r--r--sources1
3 files changed, 218 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d70a5b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/huggingface-0.0.1.tar.gz
diff --git a/python-huggingface.spec b/python-huggingface.spec
new file mode 100644
index 0000000..19e9171
--- /dev/null
+++ b/python-huggingface.spec
@@ -0,0 +1,216 @@
+%global _empty_manifest_terminate_build 0
+Name: python-huggingface
+Version: 0.0.1
+Release: 1
+Summary: HuggingFace is a single library comprising the main HuggingFace libraries.
+License: Apache 2.0
+URL: https://github.com/huggingface/huggingface
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9d/a4/168b574a23c1841fab5b24ecac98a88ea626ea3c746c481f79eb360c81f2/huggingface-0.0.1.tar.gz
+BuildArch: noarch
+
+
+%description
+Note:
+
+ VERSION needs to be formatted following the MAJOR.MINOR.PATCH convention
+ (we need to follow this convention to be able to retrieve versioned scripts)
+
+Simple check list for release from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py
+
+To create the package for pypi.
+
+1. Change the version in __init__.py, setup.py as well as docs/source/conf.py.
+
+2. Commit these changes with the message: "Release: VERSION"
+
+3. Add a tag in git to mark the release: "git tag VERSION -m'Adds tag VERSION for pypi' "
+ Push the tag to git: git push --tags origin master
+
+4. Build both the sources and the wheel. Do not change anything in setup.py between
+ creating the wheel and the source distribution (obviously).
+
+ For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
+ (this will build a wheel for the python version you use to build it).
+
+ For the sources, run: "python setup.py sdist"
+ You should now have a /dist directory with both .whl and .tar.gz source versions.
+
+ Then change the SCRIPTS_VERSION back to to "master" in __init__.py (but don't commit this change)
+
+5. Check that everything looks correct by uploading the package to the pypi test server:
+
+ twine upload dist/* -r pypitest
+ (pypi suggest using twine as other methods upload files via plaintext.)
+ You may have to specify the repository url, use the following command then:
+ twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/
+
+ Check that you can install it in a virtualenv by running:
+ pip install -i https://testpypi.python.org/pypi datasets
+
+6. Upload the final version to actual pypi:
+ twine upload dist/* -r pypi
+
+7. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.
+
+8. Update the documentation commit in .circleci/deploy.sh for the accurate documentation to be displayed
+ Update the version mapping in docs/source/_static/js/custom.js
+
+9. Update README.md to redirect to correct documentation.
+
+
+
+
+%package -n python3-huggingface
+Summary: HuggingFace is a single library comprising the main HuggingFace libraries.
+Provides: python-huggingface
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-huggingface
+Note:
+
+ VERSION needs to be formatted following the MAJOR.MINOR.PATCH convention
+ (we need to follow this convention to be able to retrieve versioned scripts)
+
+Simple check list for release from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py
+
+To create the package for pypi.
+
+1. Change the version in __init__.py, setup.py as well as docs/source/conf.py.
+
+2. Commit these changes with the message: "Release: VERSION"
+
+3. Add a tag in git to mark the release: "git tag VERSION -m'Adds tag VERSION for pypi' "
+ Push the tag to git: git push --tags origin master
+
+4. Build both the sources and the wheel. Do not change anything in setup.py between
+ creating the wheel and the source distribution (obviously).
+
+ For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
+ (this will build a wheel for the python version you use to build it).
+
+ For the sources, run: "python setup.py sdist"
+ You should now have a /dist directory with both .whl and .tar.gz source versions.
+
+ Then change the SCRIPTS_VERSION back to to "master" in __init__.py (but don't commit this change)
+
+5. Check that everything looks correct by uploading the package to the pypi test server:
+
+ twine upload dist/* -r pypitest
+ (pypi suggest using twine as other methods upload files via plaintext.)
+ You may have to specify the repository url, use the following command then:
+ twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/
+
+ Check that you can install it in a virtualenv by running:
+ pip install -i https://testpypi.python.org/pypi datasets
+
+6. Upload the final version to actual pypi:
+ twine upload dist/* -r pypi
+
+7. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.
+
+8. Update the documentation commit in .circleci/deploy.sh for the accurate documentation to be displayed
+ Update the version mapping in docs/source/_static/js/custom.js
+
+9. Update README.md to redirect to correct documentation.
+
+
+
+
+%package help
+Summary: Development documents and examples for huggingface
+Provides: python3-huggingface-doc
+%description help
+Note:
+
+ VERSION needs to be formatted following the MAJOR.MINOR.PATCH convention
+ (we need to follow this convention to be able to retrieve versioned scripts)
+
+Simple check list for release from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py
+
+To create the package for pypi.
+
+1. Change the version in __init__.py, setup.py as well as docs/source/conf.py.
+
+2. Commit these changes with the message: "Release: VERSION"
+
+3. Add a tag in git to mark the release: "git tag VERSION -m'Adds tag VERSION for pypi' "
+ Push the tag to git: git push --tags origin master
+
+4. Build both the sources and the wheel. Do not change anything in setup.py between
+ creating the wheel and the source distribution (obviously).
+
+ For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
+ (this will build a wheel for the python version you use to build it).
+
+ For the sources, run: "python setup.py sdist"
+ You should now have a /dist directory with both .whl and .tar.gz source versions.
+
+ Then change the SCRIPTS_VERSION back to to "master" in __init__.py (but don't commit this change)
+
+5. Check that everything looks correct by uploading the package to the pypi test server:
+
+ twine upload dist/* -r pypitest
+ (pypi suggest using twine as other methods upload files via plaintext.)
+ You may have to specify the repository url, use the following command then:
+ twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/
+
+ Check that you can install it in a virtualenv by running:
+ pip install -i https://testpypi.python.org/pypi datasets
+
+6. Upload the final version to actual pypi:
+ twine upload dist/* -r pypi
+
+7. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.
+
+8. Update the documentation commit in .circleci/deploy.sh for the accurate documentation to be displayed
+ Update the version mapping in docs/source/_static/js/custom.js
+
+9. Update README.md to redirect to correct documentation.
+
+
+
+
+%prep
+%autosetup -n huggingface-0.0.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-huggingface -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..c0ffb0b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+19034b17b7e6baf9521f63e2df65f1fb huggingface-0.0.1.tar.gz