File: 02-pyproj_datadir.patch

package info (click to toggle)
python-pyproj 1.9.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,208 kB
  • ctags: 3,698
  • sloc: ansic: 16,226; python: 800; makefile: 27; sh: 1
file content (26 lines) | stat: -rw-r--r-- 1,043 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Don't generate lib/pyproj/datadir.py*.
 Caused build failure 'due to unexpected upstream changes'.
 setup.py doesn't need to modify lib/pyproj/datadir.py,
 it is already patched for use by the Debian package.
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: not-needed

--- a/setup.py
+++ b/setup.py
@@ -23,16 +23,6 @@ if proj_dir is not None:
     Extension("pyproj._proj",["_proj.c"],include_dirs=incdirs,library_dirs=libdirs,\
     runtime_library_dirs=libdirs,libraries=libraries)
 
-    # over-write default data directory.
-    pyproj_datadir = os.path.join(os.path.join(proj_dir,'share'),'proj')
-    datadirfile = os.path.join('lib',os.path.join('pyproj','datadir.py'))
-    datadirfile_save = os.path.join('lib',os.path.join('pyproj','datadir.py.save'))
-    if not os.path.isfile(datadirfile_save):
-        shutil.copyfile(datadirfile, datadirfile_save)
-    f = open(datadirfile,'w')
-    f.write('pyproj_datadir="%s"\n' % pyproj_datadir)
-    f.close()
-
     extensions = [pyprojext]
     package_data = {}