Skip to content

Commit

Permalink
TVB-3109 clean-up
Browse files Browse the repository at this point in the history
TVB-3109 created pyproject.toml for tvb packages
  • Loading branch information
adrianciu committed Nov 15, 2024
1 parent 493328c commit 5605c54
Show file tree
Hide file tree
Showing 17 changed files with 660 additions and 1,464 deletions.
30 changes: 20 additions & 10 deletions tvb_bin/setup.py → tvb_bin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,25 @@
# https://www.thevirtualbrain.org/tvb/zwei/neuroscience-publications
#
#
import shutil
from setuptools import setup, find_packages

setup(
name='tvb_bin',
packages=find_packages(),
version="2.0",
license="GPL-3.0-or-later",
author="TVB Team"
)

shutil.rmtree('tvb_bin.egg-info', True)

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "tvb-bin"
version = "2.0"
license = "GPL-3.0-or-later"
authors = [
{ name = "TVB Team" },
]

[tool.hatch.version]
path = "tvb_bin/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/tvb_bin",
]
31 changes: 15 additions & 16 deletions tvb_build/package_for_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@

cd ..

python -m pip install --upgrade build

rm -Rf dist
mkdir dist

declare -a folders2pack=("tvb_framework" "tvb_library" "tvb_contrib" "tvb_storage")

if [[ "$1" != "" ]]; then
echo "Received param: " "$1"
folders2pack=("$1")
fi

for pipPackage in "${folders2pack[@]}"; do

echo "============================="
echo " Packing: " $pipPackage
echo "============================="

cd $pipPackage
python setup.py sdist
python setup.py bdist_wheel
python -m build --sdist --wheel

mv dist/* ../dist/
rm -R dist
Expand All @@ -31,12 +32,11 @@ echo "============================="
echo " Packing: tvb-rest-client"
echo "============================="
cd tvb_framework
mv setup.py setup_bck.py
mv setup_rest_client.py setup.py
python setup.py sdist
python setup.py bdist_wheel
mv setup.py setup_rest_client.py
mv setup_bck.py setup.py
mv pyproject.toml pyproject_bck.toml
mv pyproject_rest_client.toml pyproject.toml
python -m build --sdist --wheel
mv pyproject.toml pyproject_rest_client.toml
mv pyproject_bck.toml pyproject.toml
mv dist/* ../dist/
rm -R dist
rm -R build
Expand All @@ -46,16 +46,15 @@ echo "============================="
echo " Packing: tvb-bids-monitor"
echo "============================="
cd tvb_framework
mv setup.py setup_bck.py
mv setup_bids_monitor.py setup.py
python setup.py sdist
python setup.py bdist_wheel
mv setup.py setup_bids_monitor.py
mv setup_bck.py setup.py
mv pyproject.toml pyproject_bck.toml
mv pyproject_bids_monitor.toml pyproject.toml
python -m build --sdist --wheel
mv pyproject.toml pyproject_bids_monitor.toml
mv pyproject_bck.toml pyproject.toml
mv dist/* ../dist/
rm -R dist
rm -R build
cd ..

## After manual check, do the actual deploy on Pypi
# twine upload dist/*
# twine upload dist/*
36 changes: 24 additions & 12 deletions tvb_build/setup.py → tvb_build/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Framework Package. This package holds all Data Management, and
# TheVirtualBrain-Framework Package. This package holds all Data Management, and
# Web-UI helpful to run brain-simulations. To use it, you also need to download
# TheVirtualBrain-Scientific Package (for simulators). See content of the
# documentation-folder for more details. See also http://www.thevirtualbrain.org
Expand All @@ -24,17 +24,29 @@
#
#

import shutil
from setuptools import setup, find_packages


setup(
name='tvb_build',
packages=find_packages(),
version="2.0",
license="GPL-3.0-or-later",
author="TVB Team",
install_requires=['tvb-library', 'tvb-framework', 'tvb-data']
)
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

shutil.rmtree('tvb_build.egg-info', True)
[project]
name = "tvb-build"
version = "2.0"
license = "GPL-3.0-or-later"
authors = [
{ name = "TVB Team" },
]
dependencies = [
"tvb-data",
"tvb-framework",
"tvb-library",
]

[tool.hatch.version]
path = "tvb_build/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/tvb_build",
]
75 changes: 75 additions & 0 deletions tvb_contrib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Contributors Package. This package holds simulator extensions.
# See also http://www.thevirtualbrain.org
#
# (c) 2012-2024, Baycrest Centre for Geriatric Care ("Baycrest") and others
#
# This program is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with this
# program. If not, see <http://www.gnu.org/licenses/>.
#
#
# CITATION:
# When using The Virtual Brain for scientific publications, please cite it as explained here:
# https://www.thevirtualbrain.org/tvb/zwei/neuroscience-publications
#
#


[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "tvb-contrib"
version = "2.9.2"
description = "A package with TVB contributed additions to the simulator, useful for scripting."
readme = "README.rst"
license = { file = "LICENSE" }
authors = [
{ name = "Stuart Knock" },
{ name = "Dionysios Perdikis" },
{ name = "Paula Sanz Leon" },
{ name = "Bogdan Valean" },
{ name = "Marmaduke Woodman" },
{ name = "Michiel van der Vlag" },
]
maintainers = [
{ name = "TVB Admin", email = "[email protected]" }
]
keywords = [
"brain",
"contrib",
"neuroscience",
"simulator",
"tvb",
]
dependencies = [
"lxml",
"pylems",
"scikit-learn",
"tvb-library",
"xarray",
]

[project.urls]
Download = "https://github.com/the-virtual-brain/tvb-root"
Homepage = "https://www.thevirtualbrain.org"

[tool.hatch.version]
path = "tvb/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/tvb",
]

[tool.hatch.build.targets.wheel]
packages = ["tvb"]
51 changes: 0 additions & 51 deletions tvb_contrib/setup.py

This file was deleted.

Loading

0 comments on commit 5605c54

Please sign in to comment.