View | Details | Raw Unified | Return to bug 272021 | Differences between
and this patch

Collapse All | Expand All

(-)b/net/py-anonfile/Makefile (+23 lines)
Added Link Here
1
PORTNAME=	anonfile
2
DISTVERSION=	0.2.7
3
CATEGORIES=	net python
4
MASTER_SITES=	PYPI
5
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
6
7
MAINTAINER=	DtxdF@disroot.org
8
COMMENT=	Unofficial library that wraps the anonfile.com REST API
9
WWW=		https://github.com/nstrydom2/anonfile-api
10
11
LICENSE=	MIT
12
13
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR} \
14
		${PYTHON_PKGNAMEPREFIX}requests-toolbelt>0:www/py-requests-toolbelt@${PY_FLAVOR} \
15
		${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR}
17
18
USES=		python:3.9+
19
USE_PYTHON=	autoplist distutils
20
21
NO_ARCH=	yes
22
23
.include <bsd.port.mk>
(-)b/net/py-anonfile/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1686877067
2
SHA256 (anonfile-0.2.7.tar.gz) = 25357970d0e567208f4b07f6ebf036c4934b78f04f991b271bf89fe13252359d
3
SIZE (anonfile-0.2.7.tar.gz) = 12086
(-)b/net/py-anonfile/files/patch-setup.py (+33 lines)
Added Link Here
1
--- setup.py.orig	2023-06-16 04:37:29 UTC
2
+++ setup.py
3
@@ -9,14 +9,6 @@ with open("src/anonfile/anonfile.py", encoding='utf-8'
4
     python_major = int(re.search(r'python_major = "(.*?)"', lines).group(1))
5
     python_minor = int(re.search(r'python_minor = "(.*?)"', lines).group(1))
6
 
7
-print("reading dependency file")
8
-
9
-with open("requirements/release.txt", mode='r', encoding='utf-8') as requirements:
10
-    packages = requirements.read().splitlines()
11
-
12
-with open("requirements/dev.txt", mode='r', encoding='utf-8') as requirements:
13
-    dev_packages = requirements.read().splitlines()
14
-
15
 print("reading readme file")
16
 
17
 with open("README.md", "r") as fh:
18
@@ -37,9 +29,13 @@ setup(
19
         'Changelog': "https://github.com/nstrydom2/anonfile-api/blob/master/CHANGELOG.md"
20
     },    
21
     python_requires=">=%d.%d" % (python_major, python_minor),
22
-    install_requires=packages,
23
+    install_requires=[
24
+        "requests",
25
+        "requests-toolbelt",
26
+        "tqdm",
27
+        "importlib-metadata"
28
+    ],
29
     extra_requires={
30
-        'dev': dev_packages[1:],
31
         'test': ['pytest']
32
     },
33
     package_dir={'': 'src'},
(-)b/net/py-anonfile/files/patch-src_anonfile_anonfile.py (+12 lines)
Added Link Here
1
--- src/anonfile/anonfile.py.orig	2023-06-16 05:34:29 UTC
2
+++ src/anonfile/anonfile.py
3
@@ -65,7 +65,8 @@ def get_config_dir() -> Path:
4
     return {
5
         'Windows': Path(os.path.expandvars('%LOCALAPPDATA%')),
6
         'Darwin': Path.home().joinpath('Library').joinpath('Application Support'),
7
-        'Linux': Path.home().joinpath('.config')
8
+        'Linux': Path.home().joinpath('.config'),
9
+        'FreeBSD': Path.home().joinpath('.config')
10
     }[platform.system()].joinpath(package_name)
11
 
12
 def get_logfile_path() -> Path:
(-)b/net/py-anonfile/pkg-descr (-1 / +4 lines)
Added Link Here
0
- 
1
anonfile is an unofficial Python API created to make uploading and
2
downloading files from <anonfiles.com> simple and effective for
3
programming in Python. The goal of the project is to create an
4
intuitive library for anonymous file sharing.

Return to bug 272021