Skip to content

Commit ea443fe

Browse files
authored
Add pip support to build system | pip install pymoose will work on all platforms (#385)
* Don't run streamer multitab tests on OSX/Travis. * Disable all socket streamer tests. * added moose.about(). Show essential information about moose project * Add .gitlab-ci.yml * Update .gitlab-ci.yml * - Make python3 default python. - cmake 3.12 is minimum required. - Fixes to Python API. strncpy can not write to `const char*`. Instead initialize with value. - Build system fixes. * Fixes for gcc5 series. It is not smart enough to figure out which field is being updated. These needs to be ported to branch chamcham as well. * Create cmake.yml * Updated commands. * removing github actions. * Create build.yml * Added sudo ... * Run sudo apt-update ... * Fixed the name of package... * Fixed make and test targets. * Added workflow file. * Update build.yml * Using python setup.py to build the module. * Not yet complete because we still don't have static linking to gsl . * Temp commit: Build locally. * Run in inside a docker image to tweak. * Some more tweaks. * Added centos build docker file. * Docker build was successful. Needs to improve test function... * Added centos build docker file. Docker build was successful. Needs to improve test function... setup.py is working just fine. CMake and python's setup.py can use each other. Time to remove pymoose/setup.cmake.py file. Removed the cmake helper script. It has been moved to topmost directory where it can be used on its own. Squashed commit of the following: commit 374bf50 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 14:22:29 2020 +0530 This seems to work just fine. commit 4746ec4 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 21:54:25 2020 +0530 testing is required. commit d2ddaf7 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 21:34:59 2020 +0530 Seems to be just fine now. commit 63dceb4 Merge: c743aed 5499353 Author: Dilawar <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 15:32:41 2020 +0000 Merge branch 'setup.py_and_cmake' of https://github.com/dilawar/moose-core into setup.py_and_cmake commit c743aed Author: Dilawar <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 15:32:05 2020 +0000 Some more changes. commit 5499353 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 20:52:43 2020 +0530 Use cmake2.8 commit c8b365a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 20:37:54 2020 +0530 Lets test it in fresh docker image. removed uninstall target, use pip to uninstall moose. Added path in target_link_directories macro for target moose.bin. MOOSE's python module. * Minor tweaks... * Some more tweaks. * Added command test to setup.py which calls ctest. * Temp commit. * Removed the target_link_directories command which is available only in very recent cmake. * Added docker-file for suse. * Updated cmake file; build directory is now part of directories to search. * Update build.yml Fixed the test command in github actions. * Use latest xcode. * Squashed commit of the following: commit ecdc1a8 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Wed Feb 5 14:15:46 2020 +0530 Use latest xcode. commit 2a81096 Merge: a4a2338 e7cd7c0 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Wed Feb 5 14:14:24 2020 +0530 Merge remote-tracking branch 'bhallalab/master' commit a4a2338 Author: Dilawar Singh <dilawar@users.noreply.github.com> Date: Wed Feb 5 13:42:26 2020 +0530 Update build.yml Fixed the test command in github actions. commit cb0095f Merge: 4408bee 71c9756 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Wed Feb 5 14:10:24 2020 +0530 Merge branch 'devel' of https://github.com/dilawar/moose-core commit 71c9756 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 23:20:11 2020 +0530 Updated cmake file; build directory is now part of directories to search. commit 2f0d93a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 23:00:55 2020 +0530 Added docker-file for suse. commit 82adc1c Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 22:43:53 2020 +0530 Removed the target_link_directories command which is available only in very recent cmake. commit 3605566 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 17:46:22 2020 +0530 Temp commit. commit 6248e12 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 17:43:14 2020 +0530 Added command test to setup.py which calls ctest. commit a3d25aa Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 16:49:40 2020 +0530 Some more tweaks. commit 9a14b5c Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 15:35:58 2020 +0530 Minor tweaks... commit 9f475b3 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 14:01:12 2020 +0530 Added centos build docker file. Docker build was successful. Needs to improve test function... setup.py is working just fine. CMake and python's setup.py can use each other. Time to remove pymoose/setup.cmake.py file. Removed the cmake helper script. It has been moved to topmost directory where it can be used on its own. Squashed commit of the following: commit 374bf50 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 14:22:29 2020 +0530 This seems to work just fine. commit 4746ec4 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 21:54:25 2020 +0530 testing is required. commit d2ddaf7 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 21:34:59 2020 +0530 Seems to be just fine now. commit 63dceb4 Merge: c743aed 5499353 Author: Dilawar <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 15:32:41 2020 +0000 Merge branch 'setup.py_and_cmake' of https://github.com/dilawar/moose-core into setup.py_and_cmake commit c743aed Author: Dilawar <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 15:32:05 2020 +0000 Some more changes. commit 5499353 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 20:52:43 2020 +0530 Use cmake2.8 commit c8b365a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 20:37:54 2020 +0530 Lets test it in fresh docker image. removed uninstall target, use pip to uninstall moose. Added path in target_link_directories macro for target moose.bin. MOOSE's python module. commit 4408bee Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 16:00:45 2020 +0530 Docker build was successful. Needs to improve test function... commit 892b9c3 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 14:01:12 2020 +0530 Added centos build docker file. commit 5777ede Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 08:05:43 2020 +0000 Some more tweaks. commit ac30142 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 13:08:53 2020 +0530 Run in inside a docker image to tweak. commit 8bee4d0 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 04:03:40 2020 +0530 Temp commit: Build locally. commit 4d8342e Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 03:54:14 2020 +0530 Not yet complete because we still don't have static linking to gsl . commit 18e65d5 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 03:47:38 2020 +0530 Using python setup.py to build the module. commit 7a8f52d Merge: 6a7de61 1bbbc2d Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 03:12:45 2020 +0530 Merge branch 'devel' of https://github.com/dilawar/moose-core into devel commit 6a7de61 Merge: 27f62f5 749f1b8 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 02:30:13 2020 +0530 Merge branch 'master' of https://github.com/dilawar/moose-core commit 749f1b8 Author: Dilawar Singh <dilawar@users.noreply.github.com> Date: Sun Feb 2 00:18:52 2020 +0530 Update build.yml commit f089c1c Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 22:49:27 2020 +0530 Added workflow file. commit 3502f13 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 22:46:39 2020 +0530 Fixed make and test targets. commit 0768916 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 22:43:40 2020 +0530 Fixed the name of package... commit 1998950 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 22:42:04 2020 +0530 Run sudo apt-update ... commit 2cf3294 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 22:40:20 2020 +0530 Added sudo ... commit 06aa508 Author: Dilawar Singh <dilawar@users.noreply.github.com> Date: Sat Feb 1 22:38:24 2020 +0530 Create build.yml commit 08950de Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 22:03:15 2020 +0530 removing github actions. commit f471483 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Sat Feb 1 21:50:33 2020 +0530 Updated commands. commit 7453901 Author: Dilawar Singh <dilawar@users.noreply.github.com> Date: Sat Feb 1 21:39:29 2020 +0530 Create cmake.yml commit 69a3aae Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Jan 31 09:28:14 2020 +0000 Fixes for gcc5 series. It is not smart enough to figure out which field is being updated. These needs to be ported to branch chamcham as well. commit 9e0b0d1 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Fri Jan 31 13:02:32 2020 +0530 - Make python3 default python. - cmake 3.12 is minimum required. - Fixes to Python API. strncpy can not write to `const char*`. Instead initialize with value. - Build system fixes. commit 27f62f5 Merge: 2062ab2 ebfb5dc Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Jun 3 12:06:58 2019 +0530 Merge branch 'master' of github.com:dilawar/moose-core commit ebfb5dc Merge: 45216b3 526c5b0 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Jun 2 19:22:16 2019 +0530 Merge branch 'master' of https://github.com/dilawar/moose-core commit 1bbbc2d Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Apr 19 14:45:57 2019 +0530 added moose.about(). Show essential information about moose project commit c319cb4 Merge: 45216b3 1b38d64 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Apr 19 14:36:14 2019 +0530 Merge branch 'master' of github.com:BhallaLab/moose-core into devel commit 45216b3 Merge: 740fb44 58292d6 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Apr 19 14:35:14 2019 +0530 Merge branch 'master' of github.com:dilawar/moose-core commit 740fb44 Merge: 3520120 f227bb0 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Thu Mar 7 11:18:57 2019 +0530 Merge branch 'master' of github.com:BhallaLab/moose-core commit 3520120 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 13 14:12:53 2019 +0530 Disable all socket streamer tests. commit 2dd9688 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 13 13:11:50 2019 +0530 Don't run streamer multitab tests on OSX/Travis. * Setup.py works with both python2 and python3. * Using timer to timeout the test. This removes a very old bug.. * Removing old tests; move them to moose-examples. * matplotlib is always optional for tests. * setup.py seems to be building just fine. Needs tweaking in the tests. * Using setup.py file to build and install pymoose. * Fixes to github actions.. * Fixes to YAML file. * Create pymoose.yml Build with different version of python. * Some more fixes to github workflows. * Install dependencies... * Updated a bit more ... * make debian fronend non-interactive... * Added missing dependencies. * Use pip to install numpy/matplotlib before build. * Remove build tests here. [skip ci] * Update .gitlab-ci.yml * Squashed commit of the following: commit 287a26a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:51:22 2020 +0530 Remove build tests here. [skip ci] commit af3b1ec Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:41:07 2020 +0530 Use pip to install numpy/matplotlib before build. commit ddebb11 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:39:05 2020 +0530 Added missing dependencies. commit 347353b Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:37:18 2020 +0530 make debian fronend non-interactive... commit 3e69fe7 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:30:11 2020 +0530 Updated a bit more ... commit 7da6a98 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:27:21 2020 +0530 Install dependencies... commit 5d4c5ec Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:22:54 2020 +0530 Some more fixes to github workflows. commit 6dd377c Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:12:31 2020 +0530 Fixes to YAML file. commit 14529ca Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:08:05 2020 +0530 Fixes to github actions.. commit 7be23ed Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 21:06:58 2020 +0530 Using setup.py file to build and install pymoose. commit 0c3f743 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 18:44:20 2020 +0530 setup.py seems to be building just fine. Needs tweaking in the tests. commit 3667a00 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 17:41:12 2020 +0530 matplotlib is always optional for tests. commit f26d0cc Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 17:35:17 2020 +0530 Removing old tests; move them to moose-examples. commit 8058ede Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 17:23:47 2020 +0530 Using timer to timeout the test. This removes a very old bug.. commit 6b87396 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Wed Feb 5 16:01:16 2020 +0530 Setup.py works with both python2 and python3. commit ecdc1a8 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Wed Feb 5 14:15:46 2020 +0530 Use latest xcode. commit 2a81096 Merge: a4a2338 e7cd7c0 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Wed Feb 5 14:14:24 2020 +0530 Merge remote-tracking branch 'bhallalab/master' commit a4a2338 Author: Dilawar Singh <dilawar@users.noreply.github.com> Date: Wed Feb 5 13:42:26 2020 +0530 Update build.yml Fixed the test command in github actions. commit cb0095f Merge: 4408bee 71c9756 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Wed Feb 5 14:10:24 2020 +0530 Merge branch 'devel' of https://github.com/dilawar/moose-core commit 71c9756 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 23:20:11 2020 +0530 Updated cmake file; build directory is now part of directories to search. commit 2f0d93a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 23:00:55 2020 +0530 Added docker-file for suse. commit e7cd7c0 Author: Dilawar Singh <dilawar@users.noreply.github.com> Date: Tue Feb 4 22:47:27 2020 +0530 Hotfix | Packaging issues on OSX (#383) * Don't run streamer multitab tests on OSX/Travis. * Disable all socket streamer tests. * - Make python3 default python. - cmake 3.12 is minimum required. - Fixes to Python API. strncpy can not write to `const char*`. Instead initialize with value. - Build system fixes. * Fixes for gcc5 series. It is not smart enough to figure out which field is being updated. These needs to be ported to branch chamcham as well. * Create cmake.yml * Updated commands. * removing github actions. * Create build.yml * Added sudo ... * Run sudo apt-update ... * Fixed the name of package... * Fixed make and test targets. * Added workflow file. * Update build.yml commit 82adc1c Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 22:43:53 2020 +0530 Removed the target_link_directories command which is available only in very recent cmake. commit 3605566 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 17:46:22 2020 +0530 Temp commit. commit 6248e12 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 17:43:14 2020 +0530 Added command test to setup.py which calls ctest. commit a3d25aa Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 16:49:40 2020 +0530 Some more tweaks. commit 9a14b5c Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 15:35:58 2020 +0530 Minor tweaks... commit 9f475b3 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 14:01:12 2020 +0530 Added centos build docker file. Docker build was successful. Needs to improve test function... setup.py is working just fine. CMake and python's setup.py can use each other. Time to remove pymoose/setup.cmake.py file. Removed the cmake helper script. It has been moved to topmost directory where it can be used on its own. Squashed commit of the following: commit 374bf50 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue Feb 4 14:22:29 2020 +0530 This seems to work just fine. commit 4746ec4 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 21:54:25 2020 +0530 testing is required. commit d2ddaf7 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 21:34:59 2020 +0530 Seems to be just fine now. commit 63dceb4 Merge: c743aed 5499353 Author: Dilawar <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 15:32:41 2020 +0000 Merge branch 'setup.py_and_cmake' of https://github.com/dilawar/moose-core into setup.py_and_cmake commit c743aed Author: Dilawar <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 15:32:05 2020 +0000 Some more changes. commit 5499353 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 20:52:43 2020 +0530 Use cmake2.8 commit c8b365a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Mon Feb 3 20:37:54 2020 +0530 Lets test it in fresh docker image. removed uninstall target, use pip to uninstall moose. Added path in target_link_directories macro for target moose.bin. MOOSE's python module. commit 4408bee Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 16:00:45 2020 +0530 Docker build was successful. Needs to improve test function... commit 892b9c3 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 14:01:12 2020 +0530 Added centos build docker file. commit 5777ede Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 08:05:43 2020 +0000 Some more tweaks. commit ac30142 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Mon Feb 3 13:08:53 2020 +0530 Run in inside a docker image to tweak. commit 8bee4d0 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 04:03:40 2020 +0530 Temp commit: Build locally. commit 4d8342e Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 03:54:14 2020 +0530 Not yet complete because we still don't have static linking to gsl . commit 18e65d5 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 03:47:38 2020 +0530 Using python setup.py to build the module. commit 7a8f52d Merge: 6a7de61 1bbbc2d Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun Feb 2 03:12:45 2020 +0530 Merge branch 'devel' of https://github.com/dilawar/moose-core into devel commit 1bbbc2d Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Apr 19 14:45:57 2019 +0530 added moose.about(). Show essential information about moose project commit c319cb4 Merge: 45216b3 1b38d64 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Apr 19 14:36:14 2019 +0530 Merge branch 'master' of github.com:BhallaLab/moose-core into devel * Added pipeline. * Added missing setuptools. Update setuptools before building. * Install python-dev in dependencies... * Non-zero cpu count... * Updated gitlab CI. * Added scripts to build wheels. * Create dockerimage.yml Added action for building wheels. * Fixes the build failure on CentOS6. * Squashed commit of the following: commit f191857 Merge: 0401d10 27f3f6e Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Fri Feb 7 13:49:21 2020 +0530 Merge branch 'devel' of https://github.com/dilawar/moose-core into devel commit 0401d10 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Fri Feb 7 13:48:15 2020 +0530 added travis+pypi token commit bce6dfe Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Fri Feb 7 13:37:45 2020 +0530 build wheels on all platform. commit 27f3f6e Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Feb 7 06:54:37 2020 +0000 Let go back to manylinux1 image commit 9f93811 Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Fri Feb 7 05:47:51 2020 +0000 Added a dummy target. commit 6fa716c Merge: 4dc5c3e 2b4bd1d Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Thu Feb 6 13:41:31 2020 +0000 Merge branch 'master' of https://github.com/dilawar/moose-core into devel commit 4dc5c3e Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Thu Feb 6 19:07:22 2020 +0530 Changes to buidl script [skip ci] commit 15532cb Author: Dilawar Singh <dilawar.s.rajput@gmail.com> Date: Thu Feb 6 12:58:24 2020 +0000 Make the dummy extension optional. commit 725282a Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Thu Feb 6 17:55:44 2020 +0530 Install required tools as well. commit 22fde7d Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Thu Feb 6 16:13:01 2020 +0530 Dockerfile is added to build wheels in this repo itself. commit c08fb72 Author: Dilawar Singh <dilawars@ncbs.res.in> Date: Thu Feb 6 15:56:32 2020 +0530 renamed build script and fixes to some paths. * Removed dockerimage workflow for now [skip ci] * Minor tweaks to test on travis. Fixes FindGSL.cmake script. if(expr1 `OR` expr2) is fixed to if((expr1) OR (expr2)). Fixes to travis build script. sudo is not required to run this script. Fixes to the travis build. NSDF support is disabled. CLeanup in OSX build as well. Don't deploy to pypi. OSX build is passed locally. * Use a temp build directory. * Need a better way to create sdist. Added three targets. - make sdist create a source distribution for PyPi. - make upload_test upload the source distribution to TestPyPi. The command reads environment variable for user and password. export PYMOOSE_PYPI_USER=bhallalab export PYMOOSE_PYPI_PASSWORD=mypassword make upload_test - make upload Upload the source distribution to PyPI. export PYMOOSE_PYPI_USER=bhallalab export PYMOOSE_PYPI_PASSWORD=mypassword make upload Using date and rc tag to create a version for nightly release. Use twine to upload to test.pypi.org * Create stale.yml
1 parent e7cd7c0 commit ea443fe

File tree

97 files changed

+1028
-29587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1028
-29587
lines changed

.ci/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Run this script from top directory
2+
# docker build . --file .ci/Dockerfile --tag bhallalab/build-wheels:$(date +%s)
3+
FROM bhallalab/python-wheels:latest
4+
MAINTAINER Dilawar Singh <dilawar.s.rajput@gmail.com>
5+
WORKDIR /root
6+
COPY . /root/moose-core/
7+
# RUN ./build_wheels.sh
8+
CMD [ "./build_wheels.sh" ]

.ci/build_wheels_osx.sh

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#!/bin/bash
2+
set -e
3+
set -x
4+
5+
BRANCH=$(cat ./BRANCH)
6+
VERSION=3.2.dev$(date +%Y%m%d)
7+
8+
# Just to be sure on homebrew.
9+
export PATH=/usr/local/bin:$PATH
10+
11+
brew update || echo "Failed to update brew"
12+
brew install gsl || brew upgrade gsl
13+
brew upgrade python3 || echo "Failed to upgrade python3"
14+
brew upgrade python2 || echo "Failed to upgrade python2"
15+
brew upgrade python || echo "Failed to upgrade python"
16+
17+
# Following are to remove numpy; It is breaking the build on Xcode9.4.
18+
brew uninstall gdal postgis || echo "Failed to uninstall gdal/postgis"
19+
brew uninstall numpy || echo "Failed to uninstall numpy"
20+
21+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22+
23+
MOOSE_SOURCE_DIR=`pwd`/moose-core
24+
25+
if [ ! -d $MOOSE_SOURCE_DIR ]; then
26+
git clone https://github.com/BhallaLab/moose-core -b $BRANCH --depth 10
27+
fi
28+
cd moose-core && git pull
29+
WHEELHOUSE=$HOME/wheelhouse
30+
mkdir -p $WHEELHOUSE
31+
# Current version 0.7.4 seems to be broken with python3.7 .
32+
# See https://travis-ci.org/BhallaLab/deploy/jobs/435219820
33+
sudo /usr/local/bin/python -m pip install delocate virtualenv
34+
sudo /usr/local/bin/python3 -m pip install delocate virtualenv
35+
DELOCATE_WHEEL=/usr/local/bin/delocate-wheel
36+
37+
# Always prefer brew version.
38+
for _py in 3 2; do
39+
PYTHON=/usr/local/bin/python$_py
40+
41+
if [ ! -f $PYTHON ]; then
42+
echo "Not found $PYTHON"
43+
continue
44+
fi
45+
46+
$PYTHON -m pip install setuptools --upgrade --user
47+
$PYTHON -m pip install wheel --upgrade --user
48+
$PYTHON -m pip install numpy --upgrade --user
49+
$PYTHON -m pip install twine --upgrade --user
50+
51+
PLATFORM=$($PYTHON -c "import distutils.util; print(distutils.util.get_platform())")
52+
53+
(
54+
cd $MOOSE_SOURCE_DIR
55+
BUILDDIR=_build_$_py
56+
mkdir -p $BUILDDIR && cd $BUILDDIR
57+
echo " -- Building wheel for $PLATFORM"
58+
cmake -DVERSION_MOOSE=$VERSION -DPYTHON_EXECUTABLE=$PYTHON ..
59+
60+
make -j4
61+
(
62+
cd python
63+
ls *.py
64+
sed "s/from distutils.*setup/from setuptools import setup/g" \
65+
setup.cmake.py > setup.wheel.py
66+
$PYTHON setup.wheel.py bdist_wheel -p $PLATFORM
67+
# Now fix the wheel using delocate.
68+
$DELOCATE_WHEEL -w $WHEELHOUSE -v dist/*.whl
69+
)
70+
71+
ls $WHEELHOUSE/pymoose*-py${_py}-*.whl
72+
73+
# create a virtualenv and test this.
74+
rm -rf $HOME/Py${_py}
75+
(
76+
python3 -m virtualenv -p $PYTHON $HOME/Py${_py}
77+
source $HOME/Py${_py}/bin/activate
78+
set +x
79+
python -m pip install $WHEELHOUSE/pymoose*-py${_py}-*.whl
80+
echo "Testing wheel in virtualenv"
81+
which python
82+
python --version
83+
python -c 'import moose; print( moose.__version__ )'
84+
deactivate
85+
set -x
86+
)
87+
)
88+
89+
if [ ! -z "$PYPI_PASSWORD" ]; then
90+
echo "Did you test the wheels? I am uploading anyway ..."
91+
$PYTHON -m twine upload -u bhallalab -p $PYPI_PASSWORD \
92+
$HOME/wheelhouse/pymoose*.whl || echo "Failed to upload to PyPi"
93+
fi
94+
done
File renamed without changes.
File renamed without changes.
File renamed without changes.

.ci/travis_build_linux.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
#
3+
# DESCRIPTION: Build on linux environment.
4+
#
5+
# AUTHOR: Dilawar Singh (), dilawars@ncbs.res.in
6+
# ORGANIZATION: NCBS Bangalore
7+
# CREATED: 01/02/2017 10:11:46 AM
8+
9+
set -e
10+
set -x
11+
12+
PYTHON2="/usr/bin/python2"
13+
PYTHON3="/usr/bin/python3"
14+
15+
$PYTHON2 -m pip install pip --upgrade --user
16+
$PYTHON2 -m pip install libNeuroML pyNeuroML --upgrade --user
17+
18+
$PYTHON3 -m pip install pip --upgrade --user
19+
$PYTHON3 -m pip install libNeuroML pyNeuroML --upgrade --user
20+
21+
NPROC=$(nproc)
22+
MAKE="make -j$NPROC"
23+
24+
unset PYTHONPATH
25+
26+
# Bug: `which python` returns /opt/bin/python* etc on travis. For which numpy
27+
# many not be available. Therefore, it is neccessary to use fixed path for
28+
# python executable.
29+
30+
$PYTHON2 -m compileall -q .
31+
$PYTHON3 -m compileall -q .
32+
33+
# Python3 with GSL.
34+
echo "Python3: Removed python2-networkx and install python3"
35+
36+
# GSL.
37+
(
38+
mkdir -p _GSL_BUILD_PY3 && cd _GSL_BUILD_PY3 && \
39+
cmake -DPYTHON_EXECUTABLE=$PYTHON3 \
40+
-DCMAKE_INSTALL_PREFIX=/usr -DDEBUG=ON ..
41+
$MAKE && ctest -j$NPROC --output-on-failure -E ".*socket_streamer.*"
42+
make install || sudo make install
43+
cd /tmp
44+
$PYTHON3 -c 'import moose;print(moose.__file__);print(moose.version())'
45+
)
46+
47+
# BOOST and python3
48+
(
49+
mkdir -p _BOOST_BUILD_PY3 && cd _BOOST_BUILD_PY3 && \
50+
cmake -DWITH_BOOST_ODE=ON -DPYTHON_EXECUTABLE="$PYTHON3" \
51+
-DCMAKE_INSTALL_PREFIX=/usr ..
52+
$MAKE && ctest -j$NPROC --output-on-failure -E ".*socket_streamer.*"
53+
)
54+
55+
# GSL and python2, failure is allowed
56+
set +e
57+
(
58+
BUILDDIR=_GSL_PY2
59+
mkdir -p $BUILDDIR && cd $BUILDDIR && \
60+
cmake -DPYTHON_EXECUTABLE=$PYTHON2 -DCMAKE_INSTALL_PREFIX=/usr ..
61+
$MAKE && ctest -j$NPROC --output-on-failure -E ".*socket_streamer.*"
62+
)
63+
set -e
64+
65+
echo "All done"

.travis/travis_build_osx.sh renamed to .ci/travis_build_osx.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ set -o nounset # Treat unset variables as an error
2121
set -e
2222

2323
# NOTE: On travis, don't enable -j`nproc` option. It may not compile properly.
24-
24+
NPROC=$(nproc)
2525
(
2626
# Make sure not to pick up python from /opt.
2727
PATH=/usr/local/bin:/usr/bin:$PATH
@@ -37,18 +37,14 @@ set -e
3737
&& cmake -DDEBUG=ON \
3838
-DPYTHON_EXECUTABLE=$PYTHON3 \
3939
..
40-
make pylint -j3
41-
make && ctest --output-on-failure
40+
make pylint -j$NPROC
41+
make -j$NPROC && ctest --output-on-failure -$NPROC
4242

4343
cd .. # Now with boost.
4444
mkdir -p _BOOST_BUILD && cd _BOOST_BUILD \
4545
&& cmake -DWITH_BOOST_ODE=ON -DDEBUG=ON \
4646
-DPYTHON_EXECUTABLE=`which python3` ..
4747

48-
make -j4 && ctest --output-on-failure
49-
cd ..
50-
set +e
51-
48+
make -j$NPROC && ctest -j$NPROC --output-on-failure
5249
)
5350
set +e
54-

.ci/travis_prepare_linux.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash -
2+
#
3+
# DESCRIPTION: Prepare linux build environment on travis.
4+
# NOTES: Always run with sudo permission.
5+
# AUTHOR: Dilawar Singh (), dilawars@ncbs.res.in
6+
# ORGANIZATION: NCBS Bangalore
7+
# CREATED: 01/02/2017 10:10:02 AM
8+
9+
set -e -x
10+
apt update
11+
apt-get install -qq libxml2-dev libbz2-dev
12+
apt-get install -qq make cmake
13+
apt-get install -qq python-numpy python-matplotlib python-networkx python-pip
14+
apt-get install -qq python3-numpy python3-matplotlib python3-networkx python3-pip
15+
apt-get install -qq python-tk python3-tk
16+
17+
# Gsl
18+
apt-get install -qq libgsl0-dev || apt-get install -qq libgsl-dev
19+
20+
# Boost related.
21+
apt-get install -qq liblapack-dev
22+
apt-get install -qq libboost-all-dev
23+
24+
# Dependencies for NML2
25+
apt-get install -qq python-scipy python3-scipy
26+
apt-get install -qq python-lxml python3-lxml
27+
apt-get install -qq python-setuptools python3-setuptools
28+
29+
# Install twine
30+
python3 -m pip install twine
File renamed without changes.

.docker/centos/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM centos:7
2+
MAINTAINER Dilawar Singh <dilawars@ncbs.res.in>
3+
4+
# Install dependencies.
5+
RUN yum -y update && yum -y install epel-release && yum -y update \
6+
&& yum -y clean all --enablerepo='*'
7+
RUN yum install -y git cmake3 gcc gcc-c++ make \
8+
python3 python3-devel python3-setuptools python3-numpy \
9+
&& yum -y clean all --enablerepo='*'
10+
RUN yum install -y gsl-devel \
11+
&& yum -y clean all --enablerepo='*'
12+
# These are required to run tests.
13+
RUN yum install -y python3-matplotlib python3-networkx graphviz python3-scipy \
14+
&& yum -y clean all --enablerepo='*'
15+
RUN yum install -y python-matplotlib python-networkx python-scipy python-numpy \
16+
&& yum -y clean all --enablerepo='*'
17+
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
18+
RUN ln -s /usr/bin/ctest3 /usr/bin/ctest
19+
WORKDIR /home/root
20+
# RUN git clone https://github.com/dilawar/moose-core -b devel
21+
# Run docker build from outside
22+
COPY . moose-core
23+
RUN cd moose-core && python3 setup.py build test install
24+
RUN cd moose-core && python2 setup.py build test install
25+
CMD ["/usr/bin/python3", "-c", "'import moose;moose.test()'"]

0 commit comments

Comments
 (0)