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

Cleaning up packaging for package #4424

Merged
merged 10 commits into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ Enhancements
`n_initial_contacts` attribute, with documentation. (Issue #2604, PR #4415)

Changes
* Improvement of setuptools packaging, including deduplication of
dependency lists (PR #4424)
* As per NEP29, the minimum version of numpy has been raised to 1.23.
We have opted to pin to 1.23.2 to ensure the same minimum numpy version
is used from python 3.9 to 3.11 (Issue #4401, PR #4402)
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
33 changes: 24 additions & 9 deletions package/pyproject.toml
Original file line number Diff line number Diff line change
@@ -12,9 +12,11 @@ requires = [
# For unreleased versions of Python there is currently no known supported
# NumPy version. In that case we just let it be a bare NumPy install
"numpy<2.0; python_version>='3.13'",
"setuptools",
# Set to minimum version of setuptools that allows pyproject.toml
"setuptools >= 40.9.0",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "MDAnalysis"
@@ -95,13 +97,26 @@ doc = [
"pybtex-docutils",
]


[project.urls]
Documentation = 'https://docs.mdanalysis.org/'
"User Guide" = 'https://userguide.mdanalysis.org/'
"Issue Tracker" = 'https://github.com/mdanalysis/mdanalysis/issues'
"User Group" = 'https://groups.google.com/g/mdnalysis-discussion/'
Discord = 'https://discord.com/channels/807348386012987462/'
Blog = 'https://www.mdanalysis.org/blog/'
Twitter = 'https://twitter.com/mdanalysis'
Homepage = "https://www.mdanalysis.org"
Download = "https://github.com/MDAnalysis/mdanalysis/releases"
Documentation = "https://docs.mdanalysis.org/"
"User Guide" = "https://userguide.mdanalysis.org/"
"Issue Tracker" = "https://github.com/mdanalysis/mdanalysis/issues"
"Github Discussions" = "https://github.com/MDAnalysis/mdanalysis/discussions"
Discord = "https://discord.com/channels/807348386012987462/"
Blog = "https://www.mdanalysis.org/blog/"
Source = 'https://github.com/mdanalysis/mdanalysis'

[tool.setuptools]
# as a zipped egg the *.so files are not found (at
# least in Ubuntu/Linux)
zip-safe = false

[tool.setuptools.packages]
find = {}

[tool.setuptools.package-data]
MDAnalysis = [
'analysis/data/*.npy',
]
107 changes: 4 additions & 103 deletions package/setup.py
Original file line number Diff line number Diff line change
@@ -28,12 +28,12 @@

For a basic installation just type the command::

python setup.py install
pip install .

For more in-depth instructions, see the installation section at the
MDAnalysis Wiki:
MDAnalysis User Guide:

https://github.com/MDAnalysis/mdanalysis/wiki/INSTALL
https://userguide.mdanalysis.org/stable/installation.html

Also free to ask on GitHub Discussions for help:

@@ -54,13 +54,6 @@
import warnings
import platform

# Make sure I have the right Python version.
if sys.version_info[:2] < (3, 9):
print('MDAnalysis requires Python 3.9+. Python {0:d}.{1:d} detected'.format(*
sys.version_info[:2]))
print('Please upgrade your version of Python.')
sys.exit(-1)

import configparser
from subprocess import getoutput

@@ -567,112 +560,20 @@ def long_description(readme):
# (LONG_DESCRIPTION is not really needed)
LONG_DESCRIPTION = "MDAnalysis -- https://www.mdanalysis.org/"

CLASSIFIERS = [
'Development Status :: 6 - Mature',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows ',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: C',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Software Development :: Libraries :: Python Modules',
]
config = Config()
exts, cythonfiles = extensions(config)

install_requires = [
'numpy>=1.23.2',
'GridDataFormats>=0.4.0',
'mmtf-python>=1.0.0',
'joblib>=0.12',
'scipy>=1.5.0',
'matplotlib>=1.5.1',
'tqdm>=4.43.0',
'threadpoolctl',
'packaging',
'fasteners',
'mda-xdrlib',
'waterdynamics',
'pathsimanalysis',
]

setup(name='MDAnalysis',
version=RELEASE,
description='An object-oriented toolkit to analyze molecular dynamics trajectories.',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/x-rst',
author='MDAnalysis Development Team',
author_email='mdanalysis@numfocus.org',
maintainer='MDAnalysis Core Developers',
maintainer_email='mdanalysis@numfocus.org',
url='https://www.mdanalysis.org',
download_url='https://github.com/MDAnalysis/mdanalysis/releases',
project_urls={'Documentation': 'https://docs.mdanalysis.org/',
'User Guide': 'https://userguide.mdanalysis.org/',
'Issue Tracker': 'https://github.com/mdanalysis/mdanalysis/issues',
'User Group': 'https://groups.google.com/g/mdnalysis-discussion/',
'Discord': 'https://discord.com/channels/807348386012987462/',
'Blog': 'https://www.mdanalysis.org/blog/',
'Twitter': 'https://twitter.com/mdanalysis',
'Source': 'https://github.com/mdanalysis/mdanalysis',
},
license='GPL-3.0-or-later',
classifiers=CLASSIFIERS,
# currently unused & may become obsolte see setuptools #1569
provides=['MDAnalysis'],
packages=find_packages(),
package_data={'MDAnalysis':
['analysis/data/*.npy',
],
},
ext_modules=exts,
python_requires='>=3.9',
# all standard requirements are available through PyPi and
# typically can be installed without difficulties through setuptools
setup_requires=[
'numpy>=1.23.2',
'packaging',
],
install_requires=install_requires,
# extras can be difficult to install through setuptools and/or
# you might prefer to use the version available through your
# packaging system
extras_require={
'extra_formats': [ # additional file formats
'netCDF4>=1.0', # for fast AMBER writing, also needs HDF5
'h5py>=2.10', # H5MD
'pytng>=0.2.3', # TNG
'chemfiles>=0.10', # multiple formats supported by chemfiles
'pyedr>=0.7.0', # EDR files for the EDR AuxReader
'gsd>3.0.0', # GSD
'rdkit>=2020.03.1', # RDKit converter
'parmed', # ParmEd converter
],
'analysis': [
'biopython>=1.80', # sequence generation & alignment
'seaborn', # for annotated heat map and nearest neighbor
# plotting in PSA
'scikit-learn', # For clustering and dimensionality
# reduction functionality in encore
'tidynamics>=1.0.0', # For MSD analysis method
'networkx>=2.0', # For LeafletFinder
],
},
test_suite="MDAnalysisTests",
tests_require=[
'MDAnalysisTests=={0!s}'.format(RELEASE), # same as this release!
],
zip_safe=False, # as a zipped egg the *.so files are not found (at
# least in Ubuntu/Linux)
)

# Releases keep their cythonized stuff for shipping.