mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
net/py-anonfile: New port: Unofficial library that wraps the anonfile.com REST API
anonfile is an unofficial Python API created to make uploading and downloading files from <anonfiles.com> simple and effective for programming in Python. The goal of the project is to create an intuitive library for anonymous file sharing. WWW: https://github.com/nstrydom2/anonfile-api PR: 272021
This commit is contained in:
parent
8c453856c7
commit
55b68f2147
@ -1038,6 +1038,7 @@
|
||||
SUBDIR += py-aiohttp-socks
|
||||
SUBDIR += py-amqp
|
||||
SUBDIR += py-amqplib
|
||||
SUBDIR += py-anonfile
|
||||
SUBDIR += py-avahi
|
||||
SUBDIR += py-bonsai
|
||||
SUBDIR += py-cepa
|
||||
|
23
net/py-anonfile/Makefile
Normal file
23
net/py-anonfile/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
PORTNAME= anonfile
|
||||
DISTVERSION= 0.2.7
|
||||
CATEGORIES= net python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= DtxdF@disroot.org
|
||||
COMMENT= Unofficial library that wraps the anonfile.com REST API
|
||||
WWW= https://github.com/nstrydom2/anonfile-api
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}requests-toolbelt>0:www/py-requests-toolbelt@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR}
|
||||
|
||||
USES= python:3.9+
|
||||
USE_PYTHON= autoplist distutils
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
.include <bsd.port.mk>
|
3
net/py-anonfile/distinfo
Normal file
3
net/py-anonfile/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1686877067
|
||||
SHA256 (anonfile-0.2.7.tar.gz) = 25357970d0e567208f4b07f6ebf036c4934b78f04f991b271bf89fe13252359d
|
||||
SIZE (anonfile-0.2.7.tar.gz) = 12086
|
33
net/py-anonfile/files/patch-setup.py
Normal file
33
net/py-anonfile/files/patch-setup.py
Normal file
@ -0,0 +1,33 @@
|
||||
--- setup.py.orig 2023-06-16 04:37:29 UTC
|
||||
+++ setup.py
|
||||
@@ -9,14 +9,6 @@ with open("src/anonfile/anonfile.py", encoding='utf-8'
|
||||
python_major = int(re.search(r'python_major = "(.*?)"', lines).group(1))
|
||||
python_minor = int(re.search(r'python_minor = "(.*?)"', lines).group(1))
|
||||
|
||||
-print("reading dependency file")
|
||||
-
|
||||
-with open("requirements/release.txt", mode='r', encoding='utf-8') as requirements:
|
||||
- packages = requirements.read().splitlines()
|
||||
-
|
||||
-with open("requirements/dev.txt", mode='r', encoding='utf-8') as requirements:
|
||||
- dev_packages = requirements.read().splitlines()
|
||||
-
|
||||
print("reading readme file")
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
@@ -37,9 +29,13 @@ setup(
|
||||
'Changelog': "https://github.com/nstrydom2/anonfile-api/blob/master/CHANGELOG.md"
|
||||
},
|
||||
python_requires=">=%d.%d" % (python_major, python_minor),
|
||||
- install_requires=packages,
|
||||
+ install_requires=[
|
||||
+ "requests",
|
||||
+ "requests-toolbelt",
|
||||
+ "tqdm",
|
||||
+ "importlib-metadata"
|
||||
+ ],
|
||||
extra_requires={
|
||||
- 'dev': dev_packages[1:],
|
||||
'test': ['pytest']
|
||||
},
|
||||
package_dir={'': 'src'},
|
12
net/py-anonfile/files/patch-src_anonfile_anonfile.py
Normal file
12
net/py-anonfile/files/patch-src_anonfile_anonfile.py
Normal file
@ -0,0 +1,12 @@
|
||||
--- src/anonfile/anonfile.py.orig 2023-06-16 05:34:29 UTC
|
||||
+++ src/anonfile/anonfile.py
|
||||
@@ -65,7 +65,8 @@ def get_config_dir() -> Path:
|
||||
return {
|
||||
'Windows': Path(os.path.expandvars('%LOCALAPPDATA%')),
|
||||
'Darwin': Path.home().joinpath('Library').joinpath('Application Support'),
|
||||
- 'Linux': Path.home().joinpath('.config')
|
||||
+ 'Linux': Path.home().joinpath('.config'),
|
||||
+ 'FreeBSD': Path.home().joinpath('.config')
|
||||
}[platform.system()].joinpath(package_name)
|
||||
|
||||
def get_logfile_path() -> Path:
|
4
net/py-anonfile/pkg-descr
Normal file
4
net/py-anonfile/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
anonfile is an unofficial Python API created to make uploading and
|
||||
downloading files from <anonfiles.com> simple and effective for
|
||||
programming in Python. The goal of the project is to create an
|
||||
intuitive library for anonymous file sharing.
|
Loading…
Reference in New Issue
Block a user