-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving project meta and packages search to pyproject.toml
- Loading branch information
ye11owSub
authored and
ye11owSub
committed
May 20, 2024
1 parent
3943835
commit 4f6ee77
Showing
2 changed files
with
43 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[project] | ||
name = "pymol" | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
license = {file = "LICENSE"} | ||
description = """ | ||
PyMOL is a Python-enhanced molecular graphics tool. | ||
It excels at 3D visualization of proteins, small molecules, density, | ||
surfaces, and trajectories. It also includes molecular editing, | ||
ray tracing, and movies. Open Source PyMOL is free to everyone! | ||
""" | ||
dynamic=["version"] | ||
authors = [ | ||
{name = "Schrodinger", email = "[email protected]"}, | ||
] | ||
|
||
[project.scripts] | ||
pymol = "pymol:__main__" | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.0", "numpy>=1.26.4"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["modules"] | ||
|
||
[tool.setuptools.package-data] | ||
"pmg_qt" = ["forms/*.ui"] | ||
|
||
[project.urls] | ||
Homepage = "https://pymol.org" | ||
Documentation = "https://pymol.org/dokuwiki" | ||
Repository = "https://github.com/schrodinger/pymol-open-source" | ||
"Bug Tracker" = "https://github.com/schrodinger/pymol-open-source/issues" | ||
Changelog = "https://github.com/schrodinger/pymol-open-source/blob/master/ChangeLog" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,13 @@ | |
from distutils.util import change_root | ||
|
||
import create_shadertext | ||
import monkeypatch_distutils | ||
|
||
# Important: import 'distutils.command' modules after monkeypatch_distutils | ||
from distutils.command.build_ext import build_ext | ||
from distutils.command.build_py import build_py | ||
from distutils.command.install import install | ||
|
||
|
||
# non-empty DEBUG variable turns off optimization and adds -g flag | ||
DEBUG = bool(os.getenv('DEBUG', '')) | ||
|
@@ -72,7 +79,6 @@ class options: | |
sys.argv.append("--help") | ||
|
||
if True: | ||
import monkeypatch_distutils | ||
monkeypatch_distutils.set_parallel_jobs(options.jobs) | ||
|
||
|
||
|
@@ -137,11 +143,6 @@ def guess_msgpackc(): | |
return 'no' | ||
|
||
|
||
# Important: import 'distutils.command' modules after monkeypatch_distutils | ||
from distutils.command.build_ext import build_ext | ||
from distutils.command.build_py import build_py | ||
from distutils.command.install import install | ||
|
||
class build_ext_pymol(build_ext): | ||
def initialize_options(self): | ||
build_ext.initialize_options(self) | ||
|
@@ -511,22 +512,6 @@ def get_sources(subdirs, suffixes=('.c', '.cpp')): | |
return sorted([f for d in subdirs for s in suffixes for f in glob.glob(d + '/*' + s)]) | ||
|
||
|
||
def get_packages(base, parent='', r=None): | ||
from os.path import join, exists | ||
if r is None: | ||
r = [] | ||
if parent: | ||
r.append(parent) | ||
for name in os.listdir(join(base, parent)): | ||
if '.' not in name and exists(join(base, parent, name, '__init__.py')): | ||
get_packages(base, join(parent, name), r) | ||
return r | ||
|
||
|
||
package_dir = dict((x, os.path.join(base, x)) | ||
for base in ['modules'] | ||
for x in get_packages(base)) | ||
|
||
ext_modules += [ | ||
Extension("pymol._cmd", | ||
get_sources(pymol_src_dirs), | ||
|
@@ -551,20 +536,6 @@ def get_packages(base, parent='', r=None): | |
'build_py': build_py_pymol, | ||
'install': install_pymol, | ||
}, | ||
name="pymol", | ||
version=get_pymol_version(), | ||
author="Schrodinger", | ||
url="http://pymol.org", | ||
contact="[email protected]", | ||
description=("PyMOL is a Python-enhanced molecular graphics tool. " | ||
"It excels at 3D visualization of proteins, small molecules, density, " | ||
"surfaces, and trajectories. It also includes molecular editing, " | ||
"ray tracing, and movies. Open Source PyMOL is free to everyone!"), | ||
|
||
package_dir=package_dir, | ||
packages=list(package_dir), | ||
package_data={'pmg_qt': ['forms/*.ui']}, | ||
|
||
ext_modules=ext_modules, | ||
data_files=data_files, | ||
) |