Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setup file and prepare for publish in pip #199

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Nov 9, 2023

This PR supports installing batoms as a Python module, thus use it with bpy in any Python script, with access to Blender’s features.

Check this wiki

@alchem0x2A
Copy link
Collaborator

That's a huge improvement! I didn't know the official bpy build before (there was a placeholder "bpy" project at https://pypi.org/project/fake-bpy-module-latest/, but not straightforward). I assume this means we can basically 1) deprecate batoms-api, 2) simplify the installer script right?

The only apparent problem is bpy as a module requires the exact same python version as in build (Python ==3.10.*) I'm not sure how strict will the requirement for minor version be, but it seems at least the major version should match.

setup.py Outdated
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
'Programming Language :: Python :: 3',
],
python_requires='>=3.10',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per pypi description, better to put "==3.10"? https://pypi.org/project/bpy/3.6.0/#files

@alchem0x2A
Copy link
Collaborator

on the CI testings, macos builders seems to have really weird issues. we can ignore them now

@alchem0x2A
Copy link
Collaborator

on the other hand, how does the pip installation affect the installer script? I tested on a blender3.5+batoms environment and installed bpy 3.6, and they seem to not interfere with each other. Maybe this means we can include both bpy / batoms via pip inside the installer script, just to make sure the versions are correctedly handled.

@superstar54
Copy link
Member Author

I tested using a different minor Python version (3.10.0) for bpy3.6.0, and all the basic tests (atoms, bond, species, boundary) passed. It seems that the minor version doesn't matter.

However, the major version is still a restriction, which may prevent its use in other workflows, so we may keep the old batoms-api.

For the installation, we could add a new installation option using pip only, especially for HPC.

@superstar54 superstar54 merged commit 7afa84a into main Nov 14, 2023
5 of 6 checks passed
@superstar54 superstar54 deleted the feature/support_pip branch November 14, 2023 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants