[med-svn] [Git][med-team/pdb2pqr][master] Fix opening of text file; replace scons calls by calls to Debian packaged scons.
Andreas Tille
gitlab at salsa.debian.org
Thu Dec 12 20:09:31 GMT 2019
Andreas Tille pushed to branch master at Debian Med / pdb2pqr
Commits:
216ad6fe by Andreas Tille at 2019-12-12T20:08:30Z
Fix opening of text file; replace scons calls by calls to Debian packaged scons.
- - - - -
1 changed file:
- debian/patches/2to3.patch
Changes:
=====================================
debian/patches/2to3.patch
=====================================
@@ -333,6 +333,32 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
numpy_error = True
if not numpy_error:
+@@ -234,9 +234,9 @@ if env['BUILD_PDB2PKA']:
+ compile_targets.append(algorithms_pyc)
+
+ if os.name == 'nt':
+- alg_msvs_env = env.Clone(MSVSBUILDCOM='cd .. && '+pythonBin+' scons/scons.py algorithms DEBUG=True',
+- MSVSCLEANCOM='cd .. && '+pythonBin+' scons/scons.py -c algorithms',
+- MSVSREBUILDCOM='cd .. && '+pythonBin+' scons/scons.py -c algorithms && '+pythonBin+' scons/scons.py algorithms DEBUG=True')
++ alg_msvs_env = env.Clone(MSVSBUILDCOM='cd .. && scons algorithms DEBUG=True',
++ MSVSCLEANCOM='cd .. && scons -c algorithms',
++ MSVSREBUILDCOM='cd .. && scons -c algorithms && scons algorithms DEBUG=True')
+
+ algorithms_project = alg_msvs_env.MSVSProject(target = 'msvs/Algorithms' + env['MSVSPROJECTSUFFIX'],
+ auto_build_solution=0,
+@@ -259,9 +259,9 @@ if env['BUILD_PDB2PKA']:
+ compile_targets.append(pmc_pyc)
+
+ if os.name == 'nt':
+- pmc_msvs_env = env.Clone(MSVSBUILDCOM='cd .. && '+pythonBin+' scons/scons.py pmc_mult DEBUG=True'+build_swig,
+- MSVSCLEANCOM='cd .. && '+pythonBin+' scons/scons.py -c pmc_mult',
+- MSVSREBUILDCOM='cd .. && '+pythonBin+' scons/scons.py -c pmc_mult && '+pythonBin+' scons/scons.py pmc_mult DEBUG=True'+build_swig)
++ pmc_msvs_env = env.Clone(MSVSBUILDCOM='cd .. && scons pmc_mult DEBUG=True'+build_swig,
++ MSVSCLEANCOM='cd .. && scons -c pmc_mult',
++ MSVSREBUILDCOM='cd .. && scons -c pmc_mult && scons pmc_mult DEBUG=True'+build_swig)
+
+ pmc_mult_project = pmc_msvs_env.MSVSProject(target = 'msvs/pMC_mult' + env['MSVSPROJECTSUFFIX'],
+ auto_build_solution=0,
@@ -285,65 +285,65 @@ SConscript('SConscript-install.py', expo
SConscript('SConscript-error.py')
@@ -385,7 +411,7 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
- print
- print 'Run "python scons/scons.py" to build pdb2pqr.'
+ print()
-+ print('Run "python3 scons/scons.py" to build pdb2pqr.')
++ print('Run "scons" to build pdb2pqr.')
- print
- print 'The preferred way to configure the build is by editing the file', config_file
@@ -396,13 +422,13 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
+ print('The preferred way to configure the build is by editing the file', config_file)
+ print()
+ print('Run scons with the python3 that you intend to use with pdb2pqr.')
-+ print('For example: "/usr/bin/python3 scons/scons.py" will setup pdb2pqr to be run with /usr/bin/python3')
++ print('For example: "scons" will setup pdb2pqr to be run with Debian default Python3 interpreter')
if 'install' not in target_list:
- print
- print 'Run "python scons/scons.py install" to install pdb2pqr in', env['PREFIX']
+ print()
-+ print('Run "python3 scons/scons.py install" to install pdb2pqr in', env['PREFIX'])
++ print('Run "scons install" to install pdb2pqr in', env['PREFIX'])
- print
- print 'Run "python scons/scons.py basic-test" for a basic functionality test'
@@ -418,16 +444,16 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
- print 'VS project generation is not well supported in scons. Resulting projects should build using NMAKE but cannot be used for debugging.'
- print 'The resulting projects will need to modified to use VS natively to compile the code or debug.'
+ print()
-+ print('Run "python3 scons/scons.py basic-test" for a basic functionality test')
-+ print('Run "python3 scons/scons.py advanced-test" for a single test of ligand and PROPKA support. Requires numpy and PDB2PKA support compiled.')
-+ print('Run "python3 scons/scons.py complete-test" for a complete test of all functionality EXCEPT PDB2PKA. Requires numpy and PDB2PKA support compiled.')
-+ print('Run "python3 scons/scons.py pdb2pka-test" for a test of PDB2PKA functionality.')
++ print('Run "scons basic-test" for a basic functionality test')
++ print('Run "scons advanced-test" for a single test of ligand and PROPKA support. Requires numpy and PDB2PKA support compiled.')
++ print('Run "scons complete-test" for a complete test of all functionality EXCEPT PDB2PKA. Requires numpy and PDB2PKA support compiled.')
++ print('Run "scons pdb2pka-test" for a test of PDB2PKA functionality.')
+ print(' Requires numpy, PDB2PKA support compiled AND the APBS python3 libraries compiled and installed in the pdb2pka directory.')
+
+ print()
-+ print('To setup a web service create a symbolic link to', env['PREFIX'], 'that enables you to view', env['URL'],'after running "scons/scons.py install"')
++ print('To setup a web service create a symbolic link to', env['PREFIX'], 'that enables you to view', env['URL'],'after running "scons install"')
+ print()
-+ print('Run "python3 scons/scons.py msvs" to build Visual Studio projects for the Algorithms and pMC_mult modules.')
++ print('Run "scons msvs" to build Visual Studio projects for the Algorithms and pMC_mult modules.')
+ print('VS project generation is not well supported in scons. Resulting projects should build using NMAKE but cannot be used for debugging.')
+ print('The resulting projects will need to modified to use VS natively to compile the code or debug.')
@@ -8468,7 +8494,18 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
put('pdb2pqr.tgz', '~/')
with settings(warn_only=True):
-@@ -114,7 +114,7 @@ def deploy():
+@@ -106,15 +106,15 @@ def deploy():
+
+ with cd('~/tmp/'):
+ run('tar -zxvf ~/pdb2pqr.tgz')
+- run(python+' scons/scons.py')
++ run('scons')
+
+ if run_tests:
+- run(python+' scons/scons.py -j 4 pdb2pka-test')
+- run(python+' scons/scons.py -j 4 complete-test')
++ run('scons -j 4 pdb2pka-test')
++ run('scons -j 4 complete-test')
def install_on_deployed():
@@ -8477,6 +8514,17 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
with settings(warn_only=True):
with cd('~/www/pdb2pqr'):
+@@ -147,8 +147,8 @@ def install_on_deployed():
+ # configopts += ' PREFIX=/Users/d3k084/www/pdb2pqr/'
+ # configopts += ' URL=http://PT24098/d3k084/pdb2pqr'
+
+- run(python+' scons/scons.py ' + configopts)
+- run(python+' scons/scons.py install ' + configopts)
++ run('scons ' + configopts)
++ run('scons install ' + configopts)
+
+ def build_binary_from_deploy():
+ create_dist_folder()
@@ -190,11 +190,11 @@ def linux_bin_cross_platform_test():
@runs_once
def build_windows():
@@ -13658,7 +13706,12 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
if callable(v):
d[k] = env.subst(v())
elif SCons.Util.is_String(v):
-@@ -112,21 +112,21 @@ def CopySubAction(targetfile, sourcefile
+@@ -108,25 +108,25 @@ def CopySubAction(targetfile, sourcefile
+ 1.2345 etc.
+ """
+ try:
+- f = open(sourcefile, 'rb')
++ f = open(sourcefile, 'r')
contents = f.read()
f.close()
except:
View it on GitLab: https://salsa.debian.org/med-team/pdb2pqr/commit/216ad6fe4c85117a8e6d730f9f69cd012bd4b1f6
--
View it on GitLab: https://salsa.debian.org/med-team/pdb2pqr/commit/216ad6fe4c85117a8e6d730f9f69cd012bd4b1f6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20191212/b8ab914a/attachment-0001.html>
More information about the debian-med-commit
mailing list