diff --git a/.gitignore b/.gitignore index 830e696..17946be 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ __pycache__ *.db *.dat *.json -*.txt \ No newline at end of file +*.txt +Free.egg-info +build +dist diff --git a/free/VERSION b/free/VERSION new file mode 100644 index 0000000..afaf360 --- /dev/null +++ b/free/VERSION @@ -0,0 +1 @@ +1.0.0 \ No newline at end of file diff --git a/main.py b/free/run.py similarity index 95% rename from main.py rename to free/run.py index 1183aa7..a4b5ba9 100644 --- a/main.py +++ b/free/run.py @@ -88,6 +88,7 @@ def parse(self, content:str): self.parse_other(line) def run(self): + print(f"Download Files will be restored in {self.store_dir}") for task in self.tasks: try: content = str(task.parse()) @@ -130,8 +131,10 @@ def git_push(self): subprocess.call(["git", "commit", "-m", "update"]) subprocess.call(["git", "push"]) os.chdir(self.cwd) - -if __name__ == "__main__": +def Run(): v = VPN() v.run() + +if __name__ == "__main__": + Run() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a5f2f1a --- /dev/null +++ b/setup.py @@ -0,0 +1,59 @@ +from pathlib import Path +from setuptools import find_packages, setup + +install_requires = [ + "certifi>=2023.5.7", + "chardet>=5.1.0", + "charset-normalizer>=3.1.0", + "idna>=3.4", + "lxml>=4.9.2", + "Naked>=0.1.32", + "pycryptodome>=3.17", + "PyYAML>=6.0", + "requests>=2.30.0", + "shellescape>=3.8.1", + "urllib3>=2.0.2" +] + +version = (Path(__file__).parent / "free/VERSION").read_text("ascii").strip() + +setup( + name="Free", + version=version, + url="https://github.com/moqsien/vpns", + project_urls={ + "Documentation": "https://github.com/moqsien/neobox", + }, + description="A free vpns collector for neobox.", + author="Mo Qsien", + author_email="moqsien@foxmail.com", + maintainer="Mo Qsien", + maintainer_email="moqsien@foxmail.com", + license="MIT", + packages=find_packages(exclude=("tests", "tests.*")), + include_package_data=True, + zip_safe=False, + entry_points={"console_scripts": ["fvpn = free.run:Run"]}, + classifiers=[ + "Framework :: Sracpy", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries :: Application Frameworks", + "Topic :: Software Development :: Libraries :: Python Modules", + ], + python_requires=">=3.11", + install_requires=install_requires, +)