diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-05 14:54:08 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 14:54:08 +0000 |
commit | 6e92c66571366e38c8fbcbe262631ccecd064da8 (patch) | |
tree | cfb1da1e56e748bee562c5541683982768c2465a | |
parent | bcebdc253c85bc813759c9f815c77d39490f3706 (diff) |
automatic import of python-bcp47openeuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-bcp47.spec | 198 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 200 insertions, 0 deletions
@@ -0,0 +1 @@ +/bcp47-0.0.4.tar.gz diff --git a/python-bcp47.spec b/python-bcp47.spec new file mode 100644 index 0000000..a1eb51f --- /dev/null +++ b/python-bcp47.spec @@ -0,0 +1,198 @@ +%global _empty_manifest_terminate_build 0 +Name: python-bcp47 +Version: 0.0.4 +Release: 1 +Summary: Language tags made easy +License: MIT License +URL: https://github.com/highfestiva/bcp47.py +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e9/e2/5d9560dba7b272281edf2bed3c953c03d425b6d84af339a967475de068c7/bcp47-0.0.4.tar.gz +BuildArch: noarch + + +%description +# BCP47 +Language tags are not your everyday ISO standard, but instead composed of an ISO-639 language code, and an ISO-3166 country/region code +(and occationally an ISO-15924 script tag for the written language). + +The file is generated from Microsoft's seminal piece, [MS-LCID].pdf. + + +## Easy installation + +```bash +$ pip install bcp47 +``` + + +## Example + +```python +>>> import bcp47 + +>>> 'dje' in bcp47.tags and 'es-DO' in bcp47.tags +True + +>>> [v for k,v in bcp47.languages.items() if 'English' in k] +['en', 'en-AS', 'en-AI', 'en-AG', 'en-AU', 'en-AT', 'en-BS', 'en-BB', 'en-BE', 'en-BZ', 'en-BM', 'en-BW', 'en-IO', ...] +``` + + +## Discontentment + +This package only lists the most common language codes. If you want a package to parse, validate and simplify full BCP47 language tags, +have a look at [langcodes](https://github.com/LuminosoInsight/langcodes) or [langtags](https://github.com/jsommers/langtags). + +The BCP47 standard is 84 pages catering to specificity (such as `de-CH-1996` and `zh-CN-a-myext-x-private`) while this package currently +does not. Instead a highly pragmatic approach is used (some say [overly simplified](https://github.com/highfestiva/bcp47.py/issues/2)) +where only the most common 900 or so language codes are listed, such as `fo-DK` and `iu-Cans-CA`. + +Microsoft's language codes are used to ensure some level of pragmatism, [KISS](https://en.wikipedia.org/wiki/KISS_principle). Validation you +will have to do yourself, see above for a trivial example. + +Enjoy at the best of your ability! + + + + +%package -n python3-bcp47 +Summary: Language tags made easy +Provides: python-bcp47 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-bcp47 +# BCP47 +Language tags are not your everyday ISO standard, but instead composed of an ISO-639 language code, and an ISO-3166 country/region code +(and occationally an ISO-15924 script tag for the written language). + +The file is generated from Microsoft's seminal piece, [MS-LCID].pdf. + + +## Easy installation + +```bash +$ pip install bcp47 +``` + + +## Example + +```python +>>> import bcp47 + +>>> 'dje' in bcp47.tags and 'es-DO' in bcp47.tags +True + +>>> [v for k,v in bcp47.languages.items() if 'English' in k] +['en', 'en-AS', 'en-AI', 'en-AG', 'en-AU', 'en-AT', 'en-BS', 'en-BB', 'en-BE', 'en-BZ', 'en-BM', 'en-BW', 'en-IO', ...] +``` + + +## Discontentment + +This package only lists the most common language codes. If you want a package to parse, validate and simplify full BCP47 language tags, +have a look at [langcodes](https://github.com/LuminosoInsight/langcodes) or [langtags](https://github.com/jsommers/langtags). + +The BCP47 standard is 84 pages catering to specificity (such as `de-CH-1996` and `zh-CN-a-myext-x-private`) while this package currently +does not. Instead a highly pragmatic approach is used (some say [overly simplified](https://github.com/highfestiva/bcp47.py/issues/2)) +where only the most common 900 or so language codes are listed, such as `fo-DK` and `iu-Cans-CA`. + +Microsoft's language codes are used to ensure some level of pragmatism, [KISS](https://en.wikipedia.org/wiki/KISS_principle). Validation you +will have to do yourself, see above for a trivial example. + +Enjoy at the best of your ability! + + + + +%package help +Summary: Development documents and examples for bcp47 +Provides: python3-bcp47-doc +%description help +# BCP47 +Language tags are not your everyday ISO standard, but instead composed of an ISO-639 language code, and an ISO-3166 country/region code +(and occationally an ISO-15924 script tag for the written language). + +The file is generated from Microsoft's seminal piece, [MS-LCID].pdf. + + +## Easy installation + +```bash +$ pip install bcp47 +``` + + +## Example + +```python +>>> import bcp47 + +>>> 'dje' in bcp47.tags and 'es-DO' in bcp47.tags +True + +>>> [v for k,v in bcp47.languages.items() if 'English' in k] +['en', 'en-AS', 'en-AI', 'en-AG', 'en-AU', 'en-AT', 'en-BS', 'en-BB', 'en-BE', 'en-BZ', 'en-BM', 'en-BW', 'en-IO', ...] +``` + + +## Discontentment + +This package only lists the most common language codes. If you want a package to parse, validate and simplify full BCP47 language tags, +have a look at [langcodes](https://github.com/LuminosoInsight/langcodes) or [langtags](https://github.com/jsommers/langtags). + +The BCP47 standard is 84 pages catering to specificity (such as `de-CH-1996` and `zh-CN-a-myext-x-private`) while this package currently +does not. Instead a highly pragmatic approach is used (some say [overly simplified](https://github.com/highfestiva/bcp47.py/issues/2)) +where only the most common 900 or so language codes are listed, such as `fo-DK` and `iu-Cans-CA`. + +Microsoft's language codes are used to ensure some level of pragmatism, [KISS](https://en.wikipedia.org/wiki/KISS_principle). Validation you +will have to do yourself, see above for a trivial example. + +Enjoy at the best of your ability! + + + + +%prep +%autosetup -n bcp47-0.0.4 + +%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-bcp47 -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.4-1 +- Package Spec generated @@ -0,0 +1 @@ +7b5c04f8f0d7d02051a77dea123b98cd bcp47-0.0.4.tar.gz |