diff --git a/LibcSearcher.py b/LibcSearcher.py index 6fc2630..de984fa 100644 --- a/LibcSearcher.py +++ b/LibcSearcher.py @@ -31,6 +31,10 @@ def __iter__(self) : else : return iter([ self.the_libc['id'] ]) + + def __bool__(self) : + return (self.the_libc is not None) or (self.libc_list != []) + def __repr__(self) : self.pre_query_libc() diff --git a/README.md b/README.md index 6381d3c..67e81ae 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,20 @@ ## Installation +#### 使用 PIP + +```shell +sudo pip3 install LibcSearcher +``` + +更新 + +```python +sudo pip3 install -U LibcSearcher +``` + +#### 使用本仓库 + ```shell git clone https://github.com/IZAY01/LibcSearcher.git cd LibcSearcher diff --git a/setup.py b/setup.py index 2f9a9b2..3563a81 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,25 @@ from setuptools import find_packages, setup +from os import path as os_path + +this_directory = os_path.abspath(os_path.dirname(__file__)) + +def read_file(filename): + with open(os_path.join(this_directory, filename), encoding='utf-8') as f: + long_description = f.read() + return long_description setup( name="LibcSearcher", - version="1.0", + version="1.1.5", description="Python wrapper for libc-database.", author="IZAY01", author_email="IZAYOInt0x80@gmail.com", platforms=["any"], license="BSD", url="https://github.com/IZAY01/LibcSearcher", - packages=find_packages(), ) \ No newline at end of file + long_description=read_file('README.md'), + long_description_content_type="text/markdown", + install_requires=[ + 'requests', + ], + packages=find_packages(), )