mlatom 1.2.1__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.
MLatom-1.2.1/PKG-INFO ADDED
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 1.2
2
+ Name: MLatom
3
+ Version: 1.2.1
4
+ Summary: A Package for Atomistic Simulations with Machine Learning
5
+ Home-page: http://mlatom.com
6
+ Author: Pavlo O. Dral
7
+ Author-email: admin@mlatom.com
8
+ License: UNKNOWN
9
+ Description: # About MLatom
10
+ A Package for Atomistic Simulations with Machine Learning
11
+ This version 1.2 on pypi is a test uploaded version.
12
+
13
+
14
+ Platform: UNKNOWN
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Fortran
18
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
19
+ Classifier: Environment :: Console
20
+ Requires-Python: >=3.6
MLatom-1.2.1/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # About MLatom
2
+ A Package for Atomistic Simulations with Machine Learning
3
+ This version 1.2 on pypi is a test uploaded version.
4
+
MLatom-1.2.1/mlatom ADDED
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ if [ -L $0 ]; then
3
+ dir=`dirname $(readlink $0)`
4
+ else
5
+ dir=`dirname $0`
6
+ fi
7
+ py=$dir/python
8
+ pkg_path=`$py -c 'import MLatom
9
+ print(MLatom.__path__[0])
10
+ '`
11
+ mlatom_py=$pkg_path/MLatom.py
12
+ $py $mlatom_py "$@"
MLatom-1.2.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
MLatom-1.2.1/setup.py ADDED
@@ -0,0 +1,74 @@
1
+ from setuptools import setup, find_packages
2
+ from setuptools.command.install_scripts import install_scripts
3
+ from contextlib import suppress
4
+ from pathlib import Path
5
+ import os
6
+ import sys
7
+
8
+ pkg_name = "MLatom"
9
+ mlatom_script = 'mlatom'
10
+ site_pkg = ''
11
+ def modify_mlatom_script(script_path: str):
12
+ global site_pkg
13
+ for path in sys.path:
14
+ with suppress(BaseException):
15
+ for path_dir in os.listdir(path):
16
+ if pkg_name in path_dir:
17
+ site_pkg = path
18
+ print(site_pkg)
19
+ MLatom_py_file = os.path.join(site_pkg, pkg_name, 'MLatom.py')
20
+ content = f"""#!/bin/bash
21
+ export mlatom='{MLatom_py_file}'
22
+ $mlatom "$@"
23
+ """
24
+ with open(script_path, 'w') as f:
25
+ f.write(content)
26
+
27
+ def chmod_py(path):
28
+ for py_file in Path(path).glob('*.py'):
29
+ py_file.chmod(0o755)
30
+
31
+ class InstallScripts(install_scripts):
32
+ def run(self):
33
+ install_scripts.run(self)
34
+
35
+ # Rename some script files
36
+ for script in self.get_outputs():
37
+ if script.endswith('mlatom'):
38
+ modify_mlatom_script(script)
39
+
40
+ here = os.path.abspath(os.path.dirname(__file__))
41
+ with open(os.path.join(here, 'README.md')) as f:
42
+ README = f.read()
43
+
44
+ setup(
45
+ name = pkg_name,
46
+ version = "1.2.1",
47
+ author = "Pavlo O. Dral",
48
+ author_email = "admin@mlatom.com",
49
+ description = "A Package for Atomistic Simulations with Machine Learning",
50
+ long_description = README,
51
+ url = "http://mlatom.com",
52
+ python_requires='>=3.6',
53
+ packages = find_packages('src'),
54
+ package_dir = {'' : 'src'},
55
+ scripts = ['mlatom'],
56
+ package_data = {"": ['MLatomF', '*.json']},
57
+ classifiers = [
58
+ "Programming Language :: Python :: 3",
59
+ "Operating System :: POSIX :: Linux",
60
+ "Programming Language :: Fortran",
61
+ "Topic :: Scientific/Engineering :: Chemistry",
62
+ "Environment :: Console",
63
+ ],
64
+ # entry_points = {
65
+ # 'console_scripts' : ['mlatom=MLatom.MLatom:MLatomMainCls']
66
+ # }
67
+ # cmdclass = {
68
+ # "install_scripts": InstallScripts
69
+ # }
70
+ )
71
+
72
+ # bin_path = os.path.dirname(sys.executable)
73
+ # modify_mlatom_script(os.path.join(bin_path, mlatom_script))
74
+ # chmod_py(os.path.join(site_pkg, pkg_name))