def test_action_target(self): """Test action_target function, mostly w.r.t. backward compatibility.""" def fake_setup(*args, **kwargs): """Fake setup function to test action_target with.""" print('args: %s' % str(args)) print('kwargs: %s' % kwargs) self.mock_stdout(True) action_target({ 'name': 'vsc-test', 'version': '1.0.0' }, setupfn=fake_setup) txt = self.get_stdout() self.mock_stdout(False) self.assertTrue(re.search(r"^args:\s*\(\)", txt, re.M)) self.assertTrue( re.search(r"^kwargs:\s*\{.*'name':\s*'vsc-test'", txt, re.M)) self.mock_stdout(True) action_target({ 'name': 'vsc-test', 'version': '1.0.0' }, setupfn=fake_setup, urltemplate='http://example.com/%(name)s') txt = self.get_stdout() self.mock_stdout(False) self.assertTrue(re.search(r"^args:\s*\(\)", txt, re.M))
def test_action_target(self): """Test action_target function, mostly w.r.t. backward compatibility.""" def fake_setup(*args, **kwargs): """Fake setup function to test action_target with.""" print('args: %s' % str(args)) print('kwargs: %s' % kwargs) self.mock_stdout(True) action_target({'name': 'vsc-test', 'version': '1.0.0'}, setupfn=fake_setup) txt = self.get_stdout() self.mock_stdout(False) self.assertTrue(re.search(r"^args:\s*\(\)", txt, re.M)) self.assertTrue(re.search(r"^kwargs:\s*\{.*'name':\s*'vsc-test'", txt, re.M)) self.mock_stdout(True) action_target({'name': 'vsc-test', 'version': '1.0.0'}, setupfn=fake_setup, urltemplate='http://example.com/%(name)s') txt = self.get_stdout() self.mock_stdout(False) self.assertTrue(re.search(r"^args:\s*\(\)", txt, re.M))
"""List of files to remove from the (source) RPM.""" return ['lib/vsc/__init__.py'] shared_setup.remove_extra_bdist_rpm_files = remove_bdist_rpm_source_file shared_setup.SHARED_TARGET.update({ 'url': 'https://github.ugent.be/hpcugent/vsc-zk', 'download_url': 'https://github.ugent.be/hpcugent/vsc-zk' }) PACKAGE = { 'name': 'vsc-zk', 'version': '0.5.10', 'author': [sdw], 'maintainer': [sdw, kw], 'packages': ['vsc', 'vsc.zk', 'vsc.zk.rsync'], 'namespace_packages': ['vsc'], 'scripts': [ 'bin/zkrsync.py', 'bin/zkinitree.py', ], 'install_requires': [ 'vsc-base >= 1.6.7', 'kazoo >= 1.3', ], } if __name__ == '__main__': shared_setup.action_target(PACKAGE)
def remove_bdist_rpm_source_file(): """List of files to remove from the (source) RPM.""" return [] shared_setup.remove_extra_bdist_rpm_files = remove_bdist_rpm_source_file shared_setup.SHARED_TARGET.update({ 'url': 'https://github.com/hpcugent/vsc-base', 'download_url': 'https://github.com/hpcugent/vsc-base' }) PACKAGE = { 'name': 'vsc-base', 'version': '2.2.3', 'author': [sdw, jt, ag, kh], 'maintainer': [sdw, jt, ag, kh], 'packages': ['vsc', 'vsc.utils', 'vsc.install'], 'scripts': [ 'bin/logdaemon.py', 'bin/startlogdaemon.sh', 'bin/bdist_rpm.sh', 'bin/optcomplete.bash' ], 'install_requires': ['setuptools'], } if __name__ == '__main__': shared_setup.action_target(PACKAGE)
# 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 VSC-tools. If not, see <http://www.gnu.org/licenses/>. # """ Setup for mympingpong """ from vsc.install.shared_setup import action_target, sdw, vsc_install_scripts VERSION = '0.6.2' PACKAGE = { 'name': 'mympingpong', 'provides': 'mympingpong = %s' % VERSION, 'install_requires': ['vsc-base >= 1.8.6', 'numpy >= 1.8.2', 'matplotlib >= 1.3.1'], 'version': VERSION, 'author': [sdw], 'maintainer': [sdw], 'packages': ['vsc.mympingpong', 'vsc'], 'scripts': ['bin/mympingpong.py', 'bin/mympingponganalysis.py'], 'cmdclass': { "install_scripts": vsc_install_scripts, }, } if __name__ == '__main__': action_target(PACKAGE, extra_sdist=['shared_setup_mympirun.py'])
# You should have received a copy of the GNU General Public License # along with VSC-tools. If not, see <http://www.gnu.org/licenses/>. # """ Setup for mympingpong """ from vsc.install.shared_setup import action_target, sdw, vsc_install_scripts VERSION = '0.6.2' PACKAGE = { 'name': 'mympingpong', 'provides': 'mympingpong = %s' % VERSION, 'install_requires': ['vsc-base >= 1.8.6', 'numpy >= 1.8.2', 'matplotlib >= 1.3.1'], 'version': VERSION, 'author': [sdw], 'maintainer': [sdw], 'packages': ['vsc.mympingpong', 'vsc'], 'scripts': ['bin/mympingpong.py', 'bin/mympingponganalysis.py'], 'cmdclass': { "install_scripts": vsc_install_scripts, }, } if __name__ == '__main__': action_target(PACKAGE, extra_sdist=['shared_setup_mympirun.py'])
# # You should have received a copy of the GNU Library General Public License # along with vsc-base. If not, see <http://www.gnu.org/licenses/>. # """ vsc-base base distribution setup.py @author: Stijn De Weirdt (Ghent University) @author: Andy Georges (Ghent University) @author: Kenneth Hoste (Ghent University) """ import vsc.install.shared_setup as shared_setup from vsc.install.shared_setup import ag, kh, jt, sdw, URL_GH_HPCUGENT VSC_INSTALL_REQ_VERSION = '0.9.1' PACKAGE = { 'name': 'vsc-base', 'version': '2.4.10', 'author': [sdw, jt, ag, kh], 'maintainer': [sdw, jt, ag, kh], 'scripts': ['bin/logdaemon.py', 'bin/startlogdaemon.sh', 'bin/bdist_rpm.sh', 'bin/optcomplete.bash'], 'install_requires': ['vsc-install >= %s' % VSC_INSTALL_REQ_VERSION], # as long as 1.0.0 is not out, vsc-base should still provide vsc.fancylogger 'setup_requires': ['vsc-install >= %s' % VSC_INSTALL_REQ_VERSION], 'zip_safe': True, } if __name__ == '__main__': shared_setup.action_target(PACKAGE, urltemplate=URL_GH_HPCUGENT)
'lxml', 'h5py', 'mpi4py < 2.0.0', # the patched one to run, for analysis, this is ok (and not used) ], # Workaround from # https://github.com/numpy/numpy/issues/2434#issuecomment-65252402 # and # https://github.com/h5py/h5py/issues/535#issuecomment-79158166 'setup_requires': [ 'mock', 'numpy >= 1.8.2', 'nose', ], 'author': [sdw], 'maintainer': [sdw], } if sys.version_info < (2, 7): # matplotlib dropped support for python < 2.7 in version 2.0.0 idx = [i for i, x in enumerate(PACKAGE['install_requires']) if x.startswith('matplotlib')] PACKAGE['install_requires'][idx[0]] += ', < 2.0.0' # numpy also dropped support for python < 2.7 in version 1.11.0 idx = [i for i, x in enumerate(PACKAGE['install_requires']) if x.startswith('numpy')] PACKAGE['install_requires'][idx[0]] += ', < 1.11.0' idx = [i for i, x in enumerate(PACKAGE['setup_requires']) if x.startswith('numpy')] PACKAGE['setup_requires'][idx[0]] += ', < 1.11.0' if __name__ == '__main__': action_target(PACKAGE)