summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas K2016-02-11 11:12:17 +0100
committerThomas K2016-02-11 11:45:47 +0100
commit698497573c3330ad5dfd6b7e0fd3155d3f638a2c (patch)
treefb6984a5cdd3c02aa92acebe0833b9296bfd626f
parentdb24a79f770ebab66e4827d32d530e9afea08b52 (diff)
downloadaur-698497573c3330ad5dfd6b7e0fd3155d3f638a2c.tar.gz
added radiation.patch
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--radiation.patch19
3 files changed, 31 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 74a73aa8bcee..c6aeb23172f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Thu Feb 11 09:19:10 UTC 2016
+# Thu Feb 11 10:12:01 UTC 2016
pkgbase = python2-pysolar
pkgdesc = Collection of Python libraries for simulating the irradiation of any point on earth by the sun. It includes code for extremely precise ephemeris calculations.
pkgver = 0.6
@@ -11,7 +11,9 @@ pkgbase = python2-pysolar
depends = python2-numpy
depends = python2-pytz
source = https://github.com/pingswept/pysolar/archive/0.6.tar.gz
+ source = radiation.patch
md5sums = 78005c1e498100cc30842af20ca76069
+ md5sums = 5b0209ad50cab6b281daf44f5102688e
pkgname = python2-pysolar
diff --git a/PKGBUILD b/PKGBUILD
index 53ad8eebb8be..68fb62ca328b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,9 +9,16 @@ depends=('python2'
)
url='http://pysolar.org/'
license=('GPLv3')
-md5sums=('78005c1e498100cc30842af20ca76069')
-source=('https://github.com/pingswept/pysolar/archive/0.6.tar.gz')
+md5sums=('78005c1e498100cc30842af20ca76069'
+ '5b0209ad50cab6b281daf44f5102688e')
+source=('https://github.com/pingswept/pysolar/archive/0.6.tar.gz'
+ 'radiation.patch')
+
+prepare() {
+ pwd
+ patch -Np0 -i radiation.patch
+}
package() {
cd "${srcdir}/pysolar-0.6/"
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
diff --git a/radiation.patch b/radiation.patch
new file mode 100644
index 000000000000..c1ef361eb90e
--- /dev/null
+++ b/radiation.patch
@@ -0,0 +1,19 @@
+--- pysolar-0.6/Pysolar/radiation.py 2014-04-21 01:37:19.000000000 +0200
++++ pysolar-0.6/Pysolar/radiation.py 2016-02-11 10:49:50.633411106 +0100
+@@ -22,6 +22,7 @@
+ """
+ #from . import solar
+ import math
++import datetime
+
+ def GetAirMassRatio(altitude_deg):
+ # from Masters, p. 412
+@@ -40,7 +41,7 @@
+ # from Masters, p. 412
+
+ if(altitude_deg > 0):
+- day = solar.GetDayOfYear(utc_datetime)
++ day = int(datetime.datetime.utcnow().strftime("%j"))
+ flux = GetApparentExtraterrestrialFlux(day)
+ optical_depth = GetOpticalDepth(day)
+ air_mass_ratio = GetAirMassRatio(altitude_deg)