Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
4 changes: 4 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build sdist
run: pipx run build -s
- uses: actions/upload-artifact@v3
Expand All @@ -66,6 +68,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build wheel(s)
run: pipx run cibuildwheel
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Compiled python files
*.pyc

# Editor swap files
*~
.*.swp

# Build artifacts
*.so
*.c
*.egg-info/
build/
dist/

# setuptools_scm
nitime/_version.py
18 changes: 0 additions & 18 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion nitime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

__docformat__ = 'restructuredtext'

from .version import __version__
from ._version import __version__

from . import algorithms
from . import timeseries
Expand Down
99 changes: 0 additions & 99 deletions nitime/version.py

This file was deleted.

50 changes: 47 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[build-system]
requires = [
"setuptools",
"setuptools_scm[toml]>=6.2",
"cython",
# Newer than NEP29-minimum: compile against oldest numpy available
"numpy==1.24; python_version >= '3.11'",
Expand All @@ -10,10 +11,53 @@ requires = [
]
build-backend = "setuptools.build_meta"

[project]
name = "nitime"
dynamic = ["version"]
description = "Nitime: timeseries analysis for neuroscience data"
readme = "README.txt"
license = { file = "LICENSE" }
requires-python = ">=3.7"
authors = [
{ name = "Nitime developers", email = "neuroimaging@python.org" },
]
maintainers = [
{ name = "Nipy Developers", email = "neuroimaging@python.org" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
dependencies = [
"matplotlib",
"numpy",
"scipy",
]

[project.optional-dependencies]
full = [
"networkx",
"nibabel",
]

[project.urls]
Download = "http://github.com/nipy/nitime/downloads"
Homepage = "http://nipy.org/nitime"

[tool.setuptools.packages.find]
include = ["nitime*"]

[tool.setuptools_scm]
write_to = "nitime/_version.py"

[tool.cibuildwheel]
# Disable CPython 3.6 here; if project.requires-python gets defined,
# cp36* can be removed
skip = "pp* cp36*"
# Disable PyPy
skip = "pp*"

# 64-bit builds only; 32-bit builds seem pretty niche these days, so
# don't bother unless someone asks
Expand Down
66 changes: 16 additions & 50 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,63 +1,29 @@
#!/usr/bin/env python
"""Setup file for the Python nitime package."""
"""Setup file for the Python nitime package.

import os
import sys

# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')

from setuptools import find_packages, setup

# Get version and release info, which is all stored in nitime/version.py
ver_file = os.path.join('nitime', 'version.py')
with open(ver_file) as f:
exec(f.read())

REQUIRES = []

with open('requirements.txt') as f:
ll = f.readline()[:-1]
while ll:
REQUIRES.append(ll)
ll = f.readline()[:-1]

PACKAGES = find_packages()


opts = dict(name=NAME,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
url=URL,
download_url=DOWNLOAD_URL,
license=LICENSE,
classifiers=CLASSIFIERS,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
platforms=PLATFORMS,
version=VERSION,
packages=PACKAGES,
package_data=PACKAGE_DATA,
install_requires=REQUIRES,
requires=REQUIRES,
python_requires=PYTHON_REQUIRES,
)
This file only contains cython components.
See pyproject.toml for the remaining configuration.
"""
from setuptools import setup

try:
from setuptools import Extension
from Cython.Build import cythonize
from numpy import get_include

# add Cython extensions to the setup options
exts = [Extension('nitime._utils', ['nitime/_utils.pyx'],
include_dirs=[get_include()])]
opts['ext_modules'] = cythonize(exts, language_level='3')
exts = [
Extension(
'nitime._utils',
['nitime/_utils.pyx'],
include_dirs=[get_include()],
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')],
)
]
opts = {'ext_modules': cythonize(exts, language_level='3')}
except ImportError:
# no loop for you!
pass
opts = {}

# Now call the actual setup function
if __name__ == '__main__':
Expand Down
2 changes: 0 additions & 2 deletions setup_egg.py

This file was deleted.