diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-dephell-licenses.spec | 293 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 295 insertions, 0 deletions
@@ -0,0 +1 @@ +/dephell-licenses-0.1.7.tar.gz diff --git a/python-dephell-licenses.spec b/python-dephell-licenses.spec new file mode 100644 index 0000000..5d5c044 --- /dev/null +++ b/python-dephell-licenses.spec @@ -0,0 +1,293 @@ +%global _empty_manifest_terminate_build 0 +Name: python-dephell-licenses +Version: 0.1.7 +Release: 1 +Summary: Get info about OSS licenses +License: MIT +URL: https://pypi.org/project/dephell-licenses/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/de/74/b66e2e7246cab2f6323d81f1ef81ad9f21636f12603b21305db658fb7896/dephell-licenses-0.1.7.tar.gz +BuildArch: noarch + +Requires: python3-attrs +Requires: python3-requests + +%description +# DepHell Licenses + +[](https://travis-ci.org/dephell/dephell_licenses) +[](https://ci.appveyor.com/project/orsinium/dephell-licenses) +[](https://github.com/dephell/dephell_licenses/blob/master/LICENSE) + +Manage OSS licenses: retrieve information, generate. + +## Installation + +Install from [PyPI](https://pypi.org/project/dephell-licenses/): + +```bash +python3 -m pip install --user dephell_licenses +``` + +## Usage + +```python +from dephell_licenses import licenses + +# ways to get a license: +license = licenses.get_by_id('MIT') +license = licenses.get_by_name('MIT License') +license = licenses.get_by_classifier('License :: OSI Approved :: MIT License') + +# license object +license +# License(id='MIT', classifier='License :: OSI Approved :: MIT License', name='MIT License', approved=True, deprecated=False, links=['https://opensource.org/licenses/MIT'], url='http://spdx.org/licenses/MIT.json') + +# generate license +license.make_text(copyright='2019 Gram') +# 'MIT License\n\nCopyright (c) 2019 Gram\n\nPermission is hereby granted ...' +``` + +## Most popular licenses + +```bash +go run stat.go | grep "License :: " | perl -F"\|" -lane 'print $F[0] if $F[1]>100' | sort +``` + +There is the full list of the license classifiers with more than 100 projects that uses it: + +``` +License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +License :: DFSG approved +License :: Free for non-commercial use +License :: Freely Distributable +License :: Freeware +License :: OSI Approved +License :: OSI Approved :: Apache Software License +License :: OSI Approved :: BSD License +License :: OSI Approved :: GNU Affero General Public License v3 +License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+) +License :: OSI Approved :: GNU General Public License (GPL) +License :: OSI Approved :: GNU General Public License v2 (GPLv2) +License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) +License :: OSI Approved :: GNU General Public License v3 (GPLv3) +License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) +License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2) +License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) +License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) +License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) +License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) +License :: OSI Approved :: ISC License (ISCL) +License :: OSI Approved :: MIT License +License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +License :: OSI Approved :: Python Software Foundation License +License :: OSI Approved :: Zope Public License +License :: Other/Proprietary License +License :: Public Domain +License :: Repoze Public License +``` + + +%package -n python3-dephell-licenses +Summary: Get info about OSS licenses +Provides: python-dephell-licenses +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-dephell-licenses +# DepHell Licenses + +[](https://travis-ci.org/dephell/dephell_licenses) +[](https://ci.appveyor.com/project/orsinium/dephell-licenses) +[](https://github.com/dephell/dephell_licenses/blob/master/LICENSE) + +Manage OSS licenses: retrieve information, generate. + +## Installation + +Install from [PyPI](https://pypi.org/project/dephell-licenses/): + +```bash +python3 -m pip install --user dephell_licenses +``` + +## Usage + +```python +from dephell_licenses import licenses + +# ways to get a license: +license = licenses.get_by_id('MIT') +license = licenses.get_by_name('MIT License') +license = licenses.get_by_classifier('License :: OSI Approved :: MIT License') + +# license object +license +# License(id='MIT', classifier='License :: OSI Approved :: MIT License', name='MIT License', approved=True, deprecated=False, links=['https://opensource.org/licenses/MIT'], url='http://spdx.org/licenses/MIT.json') + +# generate license +license.make_text(copyright='2019 Gram') +# 'MIT License\n\nCopyright (c) 2019 Gram\n\nPermission is hereby granted ...' +``` + +## Most popular licenses + +```bash +go run stat.go | grep "License :: " | perl -F"\|" -lane 'print $F[0] if $F[1]>100' | sort +``` + +There is the full list of the license classifiers with more than 100 projects that uses it: + +``` +License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +License :: DFSG approved +License :: Free for non-commercial use +License :: Freely Distributable +License :: Freeware +License :: OSI Approved +License :: OSI Approved :: Apache Software License +License :: OSI Approved :: BSD License +License :: OSI Approved :: GNU Affero General Public License v3 +License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+) +License :: OSI Approved :: GNU General Public License (GPL) +License :: OSI Approved :: GNU General Public License v2 (GPLv2) +License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) +License :: OSI Approved :: GNU General Public License v3 (GPLv3) +License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) +License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2) +License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) +License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) +License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) +License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) +License :: OSI Approved :: ISC License (ISCL) +License :: OSI Approved :: MIT License +License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +License :: OSI Approved :: Python Software Foundation License +License :: OSI Approved :: Zope Public License +License :: Other/Proprietary License +License :: Public Domain +License :: Repoze Public License +``` + + +%package help +Summary: Development documents and examples for dephell-licenses +Provides: python3-dephell-licenses-doc +%description help +# DepHell Licenses + +[](https://travis-ci.org/dephell/dephell_licenses) +[](https://ci.appveyor.com/project/orsinium/dephell-licenses) +[](https://github.com/dephell/dephell_licenses/blob/master/LICENSE) + +Manage OSS licenses: retrieve information, generate. + +## Installation + +Install from [PyPI](https://pypi.org/project/dephell-licenses/): + +```bash +python3 -m pip install --user dephell_licenses +``` + +## Usage + +```python +from dephell_licenses import licenses + +# ways to get a license: +license = licenses.get_by_id('MIT') +license = licenses.get_by_name('MIT License') +license = licenses.get_by_classifier('License :: OSI Approved :: MIT License') + +# license object +license +# License(id='MIT', classifier='License :: OSI Approved :: MIT License', name='MIT License', approved=True, deprecated=False, links=['https://opensource.org/licenses/MIT'], url='http://spdx.org/licenses/MIT.json') + +# generate license +license.make_text(copyright='2019 Gram') +# 'MIT License\n\nCopyright (c) 2019 Gram\n\nPermission is hereby granted ...' +``` + +## Most popular licenses + +```bash +go run stat.go | grep "License :: " | perl -F"\|" -lane 'print $F[0] if $F[1]>100' | sort +``` + +There is the full list of the license classifiers with more than 100 projects that uses it: + +``` +License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +License :: DFSG approved +License :: Free for non-commercial use +License :: Freely Distributable +License :: Freeware +License :: OSI Approved +License :: OSI Approved :: Apache Software License +License :: OSI Approved :: BSD License +License :: OSI Approved :: GNU Affero General Public License v3 +License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+) +License :: OSI Approved :: GNU General Public License (GPL) +License :: OSI Approved :: GNU General Public License v2 (GPLv2) +License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) +License :: OSI Approved :: GNU General Public License v3 (GPLv3) +License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) +License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2) +License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) +License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) +License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) +License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) +License :: OSI Approved :: ISC License (ISCL) +License :: OSI Approved :: MIT License +License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +License :: OSI Approved :: Python Software Foundation License +License :: OSI Approved :: Zope Public License +License :: Other/Proprietary License +License :: Public Domain +License :: Repoze Public License +``` + + +%prep +%autosetup -n dephell-licenses-0.1.7 + +%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-dephell-licenses -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.7-1 +- Package Spec generated @@ -0,0 +1 @@ +5fc4eb516e2cad4c0d74b88f42b6e9b5 dephell-licenses-0.1.7.tar.gz |
