summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Drobot2020-08-25 20:56:12 +0300
committerViktor Drobot2020-08-25 20:56:12 +0300
commit72aab27733dbfc9963e7d94a125d0152ee2ff074 (patch)
tree84742f8b99892e7afa691f0cbd63e1481b6b0f9b
parent8372b0b73bbe3f5c8205b764cd125f2f579d05f5 (diff)
downloadaur-72aab27733dbfc9963e7d94a125d0152ee2ff074.tar.gz
Fix troubles with entry points
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD14
-rw-r--r--fix_entrypoint.patch74
3 files changed, 89 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b041655a2a2..14fb38fce1e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,20 @@
pkgbase = python-pdb2pqr
pkgdesc = Automates many of the common tasks of preparing structures for continuum solvation calculations as well as many other types of biomolecular structure modeling, analysis, and simulation.
pkgver = 3.0.1
- pkgrel = 1
+ pkgrel = 2
url = http://pypi.python.org/pypi/pdb2pqr
arch = any
license = BSD
+ makedepends = patch
depends = python>=3.5
depends = python-propka>=3.2
depends = python-pandas>=1.0
depends = python-pytest>=5.4.1
options = !emptydirs
source = https://files.pythonhosted.org/packages/source/p/pdb2pqr/pdb2pqr-3.0.1.tar.gz
+ source = fix_entrypoint.patch
sha256sums = 15ac0ce77dc17fb459092aca12cc7c2c070904f77914f1197282e28f418b6bd0
+ sha256sums = bb177e8fb9a31f2486e5682ae97139ebf87948fb4dc33dc892e90ff606df7211
pkgname = python-pdb2pqr
diff --git a/PKGBUILD b/PKGBUILD
index e06b729b99d..237145672d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,16 +3,24 @@
pkgname=python-pdb2pqr
_name=${pkgname#python-}
pkgver=3.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Automates many of the common tasks of preparing structures for continuum solvation calculations as well as many other types of biomolecular structure modeling, analysis, and simulation."
arch=(any)
url="http://pypi.python.org/pypi/${_name}"
license=(BSD)
depends=('python>=3.5' 'python-propka>=3.2' 'python-pandas>=1.0' 'python-pytest>=5.4.1')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha256sums=('15ac0ce77dc17fb459092aca12cc7c2c070904f77914f1197282e28f418b6bd0')
+makedepends=(patch)
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+ "fix_entrypoint.patch")
+sha256sums=('15ac0ce77dc17fb459092aca12cc7c2c070904f77914f1197282e28f418b6bd0'
+ 'bb177e8fb9a31f2486e5682ae97139ebf87948fb4dc33dc892e90ff606df7211')
options=(!emptydirs)
+prepare() {
+ cd "${srcdir}/${_name}-${pkgver}"
+ patch -Np0 -i "${srcdir}/fix_entrypoint.patch"
+}
+
build() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py build
diff --git a/fix_entrypoint.patch b/fix_entrypoint.patch
new file mode 100644
index 00000000000..cb004817eb7
--- /dev/null
+++ b/fix_entrypoint.patch
@@ -0,0 +1,74 @@
+--- pdb2pqr/__init__.py 2020-07-03 20:02:43.000000000 +0300
++++ pdb2pqr/__init__.py 2020-08-25 20:48:59.940600307 +0300
+@@ -6,11 +6,11 @@
+ For more information, see http://www.poissonboltzmann.org/
+ """
+ import logging
+ from sys import version_info
+ assert version_info >= (3, 5)
+-from .main import main, build_parser
++from .main import main_driver, build_parser
+
+
+ _LOGGER = logging.getLogger(__name__)
+ logging.captureWarnings(True)
+
+@@ -18,6 +18,6 @@
+ if __name__ == "__main__":
+ logging.basicConfig(level=logging.DEBUG)
+ logging.captureWarnings(True)
+ parser = build_parser()
+ args = parser.parse_args()
+- main(args)
++ main_driver(args)
+--- pdb2pqr/__main__.py 2020-07-03 20:02:43.000000000 +0300
++++ pdb2pqr/__main__.py 2020-08-25 20:49:15.213902523 +0300
+@@ -6,11 +6,11 @@
+ For more information, see http://www.poissonboltzmann.org/
+ """
+ import logging
+ from sys import version_info
+ assert version_info >= (3, 5)
+-from pdb2pqr.main import main, build_parser
++from pdb2pqr.main import main_driver, build_parser
+
+
+ _LOGGER = logging.getLogger(__name__)
+ logging.captureWarnings(True)
+
+@@ -18,6 +18,6 @@
+ if __name__ == "__main__":
+ logging.basicConfig(level=logging.DEBUG)
+ logging.captureWarnings(True)
+ parser = build_parser()
+ args = parser.parse_args()
+- main(args)
++ main_driver(args)
+--- pdb2pqr/main.py 2020-07-03 20:02:43.000000000 +0300
++++ pdb2pqr/main.py 2020-08-25 20:50:27.673754924 +0300
+@@ -533,11 +533,11 @@
+ lines = io.print_protein_atoms(matched_atoms, args.keep_chain)
+
+ return {"lines": lines, "header": header, "missed_residues": missing_atoms}
+
+
+-def main(args):
++def main_driver(args):
+ """Main driver for running program from the command line.
+
+ Validate inputs, launch PDB2PQR, handle output.
+
+ Args:
+@@ -581,5 +581,12 @@
+ missing_lines=results["missed_residues"], is_cif=is_cif)
+
+ if args.apbs_input:
+ raise NotImplementedError("Missing argument for APBS input file.")
+ io.dump_apbs(args.output_pqr)
++
++
++def main():
++ """Hook for command-line usage."""
++ parser = build_parser()
++ args = parser.parse_args()
++ main_driver(args)