BCDA-APS / mdaviz

Data visualization for mda
https://bcda-aps.github.io/mdaviz/
Other
3 stars 0 forks source link

update packaging to build wheel & source distribution #114

Closed prjemian closed 1 month ago

prjemian commented 2 months ago

Update the packaging per PEP518 so that python -m build --sdist --wheel --outdir dist . will build the requisite files for upload to PyPI.

One of the things to correct is the dependencies here which belong in a different section: https://github.com/BCDA-APS/mdaviz/blob/d6e04896d3f8f73fa0a8d7a171861ed058b6522b/pyproject.toml#L5 https://github.com/BCDA-APS/mdaviz/blob/d6e04896d3f8f73fa0a8d7a171861ed058b6522b/pyproject.toml#L8

See the comparable section in gemviz:

dependencies = [
  "matplotlib",
  "pyRestTable",
  "tiled",
]

Additional suggestions are in the Python Packaging User Guide.

prjemian commented 2 months ago

The version pins in these lines could be updated: https://github.com/BCDA-APS/mdaviz/blob/d6e04896d3f8f73fa0a8d7a171861ed058b6522b/pyproject.toml#L6-L7

to

  "setuptools>=64",
  "setuptools_scm[toml]>=8",
prjemian commented 2 months ago

Will need the build package: python -m pip install build

prjemian commented 2 months ago

This project is dependent on the mda package, which is not available on PyPI.

https://raw.githubusercontent.com/EPICS-synApps/support/master/utils/mdaPythonUtils/mdalib-2022.post9-py2.py3-none-any.whl

prjemian commented 2 months ago

An alternative to creating a wheel of the mdalib for PyPI is to vendor the files into this package. Considering years could pass between mdalib updates, vendoring might be the better approach. There are just two files, 9kB and 51kB.

-rw-rw-r-- 1 prjemian prjemian 9.1K Sep  2  2022 f_xdrlib.py
-rw-rw-r-- 1 prjemian prjemian  56K Sep  2  2022 mda.py

Also note that PyPI already has packages for mda (analysis of molecular dynamics simulations) and mdalib (kafka, telephony?). If the synApps mdalib package is to be uploaded, it might take the name synApps-mdalib.