diff options
Diffstat (limited to 'python-anole.spec')
-rw-r--r-- | python-anole.spec | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/python-anole.spec b/python-anole.spec new file mode 100644 index 0000000..ef67a38 --- /dev/null +++ b/python-anole.spec @@ -0,0 +1,225 @@ +%global _empty_manifest_terminate_build 0 +Name: python-anole +Version: 0.2.3 +Release: 1 +Summary: Like a anole, fake everything. +License: MIT +URL: https://leesoar.com +Source0: https://mirrors.aliyun.com/pypi/web/packages/44/1d/4a293a2dc7cd25c6497991609e20c072be14810741a160b88596190007a5/anole-0.2.3.tar.gz +BuildArch: noarch + +Requires: python3-faker +Requires: python3-requests +Requires: python3-retrying + +%description + +## Anole + +Like a anole, fake everything. + +Currently support user agent and name fake, other will be coming soon. + +Thanks for use. + + +### How to use +```python +from anole import UserAgent + + +# Suppose this is the request headers +headers = { + "referer": "https://leesoar.com" +} +user_agent = UserAgent() +user_agent.fake(headers) +``` + +> It will check if there is "user-agent" in headers. If not, "user-agent" will update with random. + + +```python +from anole import Name + + +name = Name() +name.fake() # Whole name's length is between 2 and 3. +name.fake(length=2) # You can specify the length of the name. +name.fake(surname="李") # And you can specify the surname. + +``` + + +### Use as fake_useragent +```python +from anole import UserAgent + + +user_agent = UserAgent() +user_agent.random +# or user_agent.chrome +# or other browsers +``` + + + + +%package -n python3-anole +Summary: Like a anole, fake everything. +Provides: python-anole +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-anole + +## Anole + +Like a anole, fake everything. + +Currently support user agent and name fake, other will be coming soon. + +Thanks for use. + + +### How to use +```python +from anole import UserAgent + + +# Suppose this is the request headers +headers = { + "referer": "https://leesoar.com" +} +user_agent = UserAgent() +user_agent.fake(headers) +``` + +> It will check if there is "user-agent" in headers. If not, "user-agent" will update with random. + + +```python +from anole import Name + + +name = Name() +name.fake() # Whole name's length is between 2 and 3. +name.fake(length=2) # You can specify the length of the name. +name.fake(surname="李") # And you can specify the surname. + +``` + + +### Use as fake_useragent +```python +from anole import UserAgent + + +user_agent = UserAgent() +user_agent.random +# or user_agent.chrome +# or other browsers +``` + + + + +%package help +Summary: Development documents and examples for anole +Provides: python3-anole-doc +%description help + +## Anole + +Like a anole, fake everything. + +Currently support user agent and name fake, other will be coming soon. + +Thanks for use. + + +### How to use +```python +from anole import UserAgent + + +# Suppose this is the request headers +headers = { + "referer": "https://leesoar.com" +} +user_agent = UserAgent() +user_agent.fake(headers) +``` + +> It will check if there is "user-agent" in headers. If not, "user-agent" will update with random. + + +```python +from anole import Name + + +name = Name() +name.fake() # Whole name's length is between 2 and 3. +name.fake(length=2) # You can specify the length of the name. +name.fake(surname="李") # And you can specify the surname. + +``` + + +### Use as fake_useragent +```python +from anole import UserAgent + + +user_agent = UserAgent() +user_agent.random +# or user_agent.chrome +# or other browsers +``` + + + + +%prep +%autosetup -n anole-0.2.3 + +%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-anole -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.3-1 +- Package Spec generated |