pyxdia 0.0.0.dev0__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.
File without changes
@@ -0,0 +1,7 @@
1
+ graft pyxdia
2
+ prune pyxdia/bin
3
+ include LICENSE.txt
4
+ graft tests
5
+ global-exclude *.so
6
+ global-exclude *.gitignore
7
+ global-exclude *.pyc
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyxdia
3
+ Version: 0.0.0.dev0
4
+ Summary: pyxdia
5
+ Classifier: Programming Language :: Python
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3 :: Only
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE.txt
14
+ Provides-Extra: docs
15
+ Requires-Dist: furo; extra == "docs"
16
+ Requires-Dist: ipython; extra == "docs"
17
+ Requires-Dist: myst-parser; extra == "docs"
18
+ Requires-Dist: sphinx; extra == "docs"
19
+ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
File without changes
@@ -0,0 +1,13 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.black]
6
+ line-length = 120
7
+ target-version = ['py310']
8
+
9
+ [tool.ruff]
10
+ line-length = 120
11
+ extend-ignore = [
12
+ "E402", # Bottom imports
13
+ ]
@@ -0,0 +1,5 @@
1
+ from .pdb import load_pdb
2
+
3
+ __all__ = [
4
+ "load_pdb"
5
+ ]
@@ -0,0 +1,17 @@
1
+ import argparse
2
+ from pprint import pprint
3
+
4
+ from .pdb import load_pdb
5
+
6
+
7
+ def main():
8
+ ap = argparse.ArgumentParser("pyxdia")
9
+ ap.add_argument("pdb", help="Path to PDB file")
10
+ args = ap.parse_args()
11
+
12
+ pdb = load_pdb(args.pdb)
13
+ pprint(pdb, indent=2)
14
+
15
+
16
+ if __name__ == '__main__':
17
+ main()
@@ -0,0 +1 @@
1
+ __version__ = '0.0.0.dev0'
@@ -0,0 +1,30 @@
1
+ import subprocess
2
+ import pathlib
3
+ import platform
4
+ import json
5
+
6
+ ROOT_PATH = pathlib.Path(__file__).parent
7
+ XDIA_EXE_PATH = ROOT_PATH / "bin" / "xdia.exe"
8
+ MSDIA_DLL_PATH = ROOT_PATH / "bin" / "msdia140.dll"
9
+
10
+ if platform.system() in ("Linux", "Darwin"):
11
+ XDIALDR_PATH = ROOT_PATH / "bin" / "xdialdr"
12
+ if platform.system() == "Darwin":
13
+ BLINK_PATH = ROOT_PATH / "bin" / "blink"
14
+
15
+ def load_pdb(pdb_path: pathlib.Path):
16
+ env = {"MSDIA_PATH": str(MSDIA_DLL_PATH), "XDIA_PATH": str(XDIA_EXE_PATH)}
17
+
18
+ if platform.system() == "Windows":
19
+ cmd = [XDIA_EXE_PATH]
20
+ elif platform.system() == "Linux":
21
+ cmd = [XDIALDR_PATH]
22
+ elif platform.system() == "Darwin":
23
+ cmd = [BLINK_PATH, XDIALDR_PATH]
24
+ else:
25
+ raise NotImplementedError("Unhandled platform")
26
+
27
+ cmd += [pdb_path]
28
+
29
+ diadump_s = subprocess.check_output(cmd, encoding="utf-8", env=env)
30
+ return json.loads(diadump_s)
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyxdia
3
+ Version: 0.0.0.dev0
4
+ Summary: pyxdia
5
+ Classifier: Programming Language :: Python
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3 :: Only
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE.txt
14
+ Provides-Extra: docs
15
+ Requires-Dist: furo; extra == "docs"
16
+ Requires-Dist: ipython; extra == "docs"
17
+ Requires-Dist: myst-parser; extra == "docs"
18
+ Requires-Dist: sphinx; extra == "docs"
19
+ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
@@ -0,0 +1,15 @@
1
+ LICENSE.txt
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.cfg
6
+ setup.py
7
+ pyxdia/__init__.py
8
+ pyxdia/__main__.py
9
+ pyxdia/__version__.py
10
+ pyxdia/pdb.py
11
+ pyxdia.egg-info/PKG-INFO
12
+ pyxdia.egg-info/SOURCES.txt
13
+ pyxdia.egg-info/dependency_links.txt
14
+ pyxdia.egg-info/requires.txt
15
+ pyxdia.egg-info/top_level.txt
@@ -0,0 +1,7 @@
1
+
2
+ [docs]
3
+ furo
4
+ ipython
5
+ myst-parser
6
+ sphinx
7
+ sphinx-autodoc-typehints
@@ -0,0 +1 @@
1
+ pyxdia
@@ -0,0 +1,32 @@
1
+ [metadata]
2
+ name = pyxdia
3
+ version = attr: pyxdia.__version__.__version__
4
+ description = pyxdia
5
+ long_description = file: README.md
6
+ long_description_content_type = text/markdown
7
+ license_files = LICENSE.txt
8
+ classifiers =
9
+ Programming Language :: Python
10
+ Programming Language :: Python :: 3
11
+ Programming Language :: Python :: 3 :: Only
12
+ Programming Language :: Python :: 3.10
13
+ Programming Language :: Python :: 3.11
14
+ Programming Language :: Python :: 3.12
15
+
16
+ [options]
17
+ packages =
18
+ pyxdia
19
+ python_requires = >=3.10
20
+
21
+ [options.extras_require]
22
+ docs =
23
+ furo
24
+ ipython
25
+ myst-parser
26
+ sphinx
27
+ sphinx-autodoc-typehints
28
+
29
+ [egg_info]
30
+ tag_build =
31
+ tag_date = 0
32
+
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env python3
2
+
3
+ from pathlib import Path
4
+ import platform
5
+ import subprocess
6
+ from setuptools import setup
7
+ from setuptools.command.build_py import build_py
8
+ from setuptools.command.develop import develop as _develop
9
+
10
+ def build_common():
11
+ root_dir = Path(__file__).parent.absolute()
12
+ pyxdia_dir = root_dir / "pyxdia"
13
+ bin_dir = pyxdia_dir / "bin"
14
+ xdia_exe_path = bin_dir / "xdia.exe"
15
+ msdia140_dll_path = bin_dir / "msdia140.dll"
16
+
17
+ if not (xdia_exe_path.exists() and msdia140_dll_path.exists()):
18
+ raise RuntimeError("Missing xdia installation")
19
+
20
+ class build(build_py):
21
+ def run(self):
22
+ build_common()
23
+ return super().run()
24
+
25
+ class develop(_develop):
26
+ def run(self):
27
+ build_common()
28
+ return super().run()
29
+
30
+ setup(
31
+ cmdclass=dict(build_py=build, develop=develop),
32
+ packages=['pyxdia'],
33
+ package_data={'pyxdia': ['bin/*']},
34
+ )