diff options
author | Roelof Rietbroek | 2018-04-16 20:32:52 +0200 |
---|---|---|
committer | Roelof Rietbroek | 2018-04-16 20:32:52 +0200 |
commit | 03212c0da03eb2ae9685c45b045720d3eda75e69 (patch) | |
tree | 75a19e4a1378bf1bb55adea8c55d6c95e5f448aa | |
download | aur-03212c0da03eb2ae9685c45b045720d3eda75e69.tar.gz |
first step to prepare pysofa package
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | octonotationpatch.diff | 182 |
4 files changed, 242 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..00c45aead134 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = pysofa + pkgdesc = Python interface to SOFA C library (Standards of Fundamental Astronomy) + pkgver = 0.1.1 + pkgrel = 1 + url = https://code.google.com/archive/p/pysofa/ + arch = any + license = SOFA License + depends = sofa + depends = python-numpy + source = https://pypi.python.org/packages/f5/fd/557bc955527164df6d5699ba2369415a26767a90e848ce362600435d4553/pysofa-0.1.1.tar.gz + source = octonotationpatch.diff + md5sums = 962be6439044b4ff666f735b2207aaa8 + md5sums = 5e6cef758d9861cba2e72eb2faff3ee4 + +pkgname = pysofa + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..00aba4bea69e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src +pkg +*tar.gz +*xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..504f3f6e465c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Arch User repository PKGBUILD file +# Builds the python interface for the SOFA library +# Maintainer: Roelof Rietbroek <roelof@wobbly.earth> +pkgname=pysofa +pkgver=0.1.1 +pkgrel=1 +pkgdesc="Python interface to SOFA C library (Standards of Fundamental Astronomy)" +arch=('any') +url="https://code.google.com/archive/p/pysofa/" +license=('SOFA License') +groups=() +depends=("sofa" "python-numpy") +makedepends=() +source=("https://pypi.python.org/packages/f5/fd/557bc955527164df6d5699ba2369415a26767a90e848ce362600435d4553/pysofa-$pkgver.tar.gz" "octonotationpatch.diff") +noextract=() +md5sums=('962be6439044b4ff666f735b2207aaa8' + '5e6cef758d9861cba2e72eb2faff3ee4') +validpgpkeys=() + +prepare() { + _startdir=${PWD} + cd ${srcdir} + #patch some files to get rid of the octo notation (doesn't work in python 3) + patch pysofa-${pkgver}/pysofa/pysofa_ctypes.py octonotationpatch.diff + cd ${_startdir} +} + +build() { + cd ${srcdir}/pysofa-${pkgver}/ + python ./setup.py build + cd ${_startdir} +} + + +package() { + cd ${srcdir}/pysofa-${pkgver}/ + python ./setup.py install --root="${pkgdir}/" + cd ${_startdir} +} + diff --git a/octonotationpatch.diff b/octonotationpatch.diff new file mode 100644 index 000000000000..669639dec3ba --- /dev/null +++ b/octonotationpatch.diff @@ -0,0 +1,182 @@ +--- tmp/pysofa-0.1.1/pysofa/pysofa_ctypes.py 2011-01-30 10:53:37.000000000 +0100 ++++ pysofa_ctypes_new.py 2018-04-16 17:17:58.439424197 +0200 +@@ -156,7 +156,7 @@ + .. seealso:: |MANUAL| page 21 + """ + +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + rad = c_double() + s = _sofa.iauAf2a(str(s), ideg, iamin, asec, byref(rad)) +@@ -1011,7 +1011,7 @@ + .. seealso:: |MANUAL| page 64 + """ + +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + d1 = c_double() + d2 = c_double() +@@ -4236,7 +4236,7 @@ + + .. seealso:: |MANUAL| page 224 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tt1 = c_double() + tt2 = c_double() +@@ -4269,7 +4269,7 @@ + + .. seealso:: |MANUAL| page 225 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + ut11 = c_double() + ut12 = c_double() +@@ -4309,7 +4309,7 @@ + + .. seealso:: |MANUAL| page 226 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + utc1 = c_double() + utc2 = c_double() +@@ -4342,7 +4342,7 @@ + + .. seealso:: |MANUAL| page 227 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tdb1 = c_double() + tdb2 = c_double() +@@ -4371,7 +4371,7 @@ + + .. seealso:: |MANUAL| page 228 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tt1 = c_double() + tt2 = c_double() +@@ -4400,7 +4400,7 @@ + + .. seealso:: |MANUAL| page 229 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tcb1 = c_double() + tcb2 = c_double() +@@ -4433,7 +4433,7 @@ + + .. seealso:: |MANUAL| page 230 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tt1 = c_double() + tt2 = c_double() +@@ -4472,7 +4472,7 @@ + .. seealso:: |MANUAL| page 231 + """ + +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + rad = c_double() + s = _sofa.iauTf2a(str(s), ihour, imin, sec, byref(rad)) +@@ -4510,7 +4510,7 @@ + .. seealso:: |MANUAL| page 232 + """ + +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + days = c_double() + s = _sofa.iauTf2d(str(s), ihour, imin, sec, byref(days)) +@@ -4600,7 +4600,7 @@ + + .. seealso:: |MANUAL| page 236 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tai1 = c_double() + tai2 = c_double() +@@ -4629,7 +4629,7 @@ + + .. seealso:: |MANUAL| page 237 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tcg1 = c_double() + tcg2 = c_double() +@@ -4662,7 +4662,7 @@ + + .. seealso:: |MANUAL| page 238 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tdb1 = c_double() + tdb2 = c_double() +@@ -4695,7 +4695,7 @@ + + .. seealso:: |MANUAL| page 239 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + ut11 = c_double() + ut12 = c_double() +@@ -4728,7 +4728,7 @@ + + .. seealso:: |MANUAL| page 240 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tai1 = c_double() + tai2 = c_double() +@@ -4761,7 +4761,7 @@ + + .. seealso:: |MANUAL| page 241 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tt1 = c_double() + tt2 = c_double() +@@ -4805,7 +4805,7 @@ + + .. seealso:: |MANUAL| page 242 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + utc1 = c_double() + utc2 = c_double() +@@ -4849,7 +4849,7 @@ + + .. seealso:: |MANUAL| page 243 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + tai1 = c_double() + tai2 = c_double() +@@ -4897,7 +4897,7 @@ + + .. seealso:: |MANUAL| page 244 + """ +- if __sofa_version < (2010, 12, 01): ++ if __sofa_version < (2010, 12, 1): + raise NotImplementedError + ut11 = c_double() + ut12 = c_double() |