/[thuban]/branches/WIP-pyshapelib-bramz/setup.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/setup.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 266 by bh, Wed Aug 21 09:15:26 2002 UTC revision 555 by jonathan, Tue Mar 25 16:21:23 2003 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001, 2002 by Intevation GmbH  # Copyright (c) 2001, 2002, 2003 by Intevation GmbH
2  # Authors:  # Authors:
3  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
4  #  #
# Line 80  elif os.name == "nt": Line 80  elif os.name == "nt":
80      proj4_lib = "proj_i"      proj4_lib = "proj_i"
81    
82      # Define include and lib directories for wxWindows and      # Define include and lib directories for wxWindows and
83      wx_prefix = r"D:\wx230"      wx_prefix = r"D:\wx240"
84      wx_inc =  os.path.join(wx_prefix, "include")      wx_inc = [os.path.join(wx_prefix, 'lib', 'mswdllh'),
85      wx_lib =  os.path.join(wx_prefix, "lib")                os.path.join(wx_prefix, "include")]
86        wx_lib = [os.path.join(wx_prefix, "lib")]
87    
88    
89      #      #
90      # Unless you use a wxPython version other than 2.3.1, you probably      # Unless you use a wxPython version other than 2.4.0, you probably
91      # shouldn't have to modify anything below here      # shouldn't have to modify anything below here
92      ##################################################################      ##################################################################
93            
# Line 127  elif os.name == "nt": Line 129  elif os.name == "nt":
129                  ('WXP_USE_THREAD', '1'),                  ('WXP_USE_THREAD', '1'),
130                  ]                  ]
131            
132      wx_incdirs = [wx_inc]      wx_incdirs = wx_inc
133      wx_libdirs = [wx_lib]      wx_libdirs = wx_lib
134      wx_libs = ["wx23_1h"]      wx_libs = ["wxmsw24h"]
135    
136      wx_libs = wx_libs + ['kernel32', 'user32', 'gdi32', 'comdlg32',      wx_libs = wx_libs + ['kernel32', 'user32', 'gdi32', 'comdlg32',
137                           'winspool', 'winmm', 'shell32', 'oldnames',                           'winspool', 'winmm', 'shell32', 'oldnames',
138                           'comctl32', 'ctl3d32', 'odbc32', 'ole32', 'oleaut32',                           'comctl32', 'ctl3d32', 'odbc32', 'ole32', 'oleaut32',
# Line 488  class thuban_build_py(build_py): Line 491  class thuban_build_py(build_py):
491      distribution.      distribution.
492      """      """
493    
494        # FIXME: When Thuban can rely on Python 2.3 as the oldest supported
495        # Python release we don't need to override the run and
496        # find_all_modules methods anymore. distutils will allow both python
497        # modules and packages starting with 2.3.
498    
499      def run(self):      def run(self):
500          """The same the as the original in build_py revision 1.33 except          """The same the as the original in build_py revision 1.33 except
501          that this allows both packages and modules to be in one          that this allows both packages and modules to be in one
# Line 748  cp extensions/pyshapelib/{COPYING,COPYIN Line 756  cp extensions/pyshapelib/{COPYING,COPYIN
756  cp extensions/pyprojection/{LICENSE,LICENSE.pyprojection}  cp extensions/pyprojection/{LICENSE,LICENSE.pyprojection}
757  '''  '''
758    
759    bdist_rpm_build_script = '''
760    env PATH="$PATH:%(prefix)s/lib/wxPython/bin:/usr/lib/wxPython/bin" CFLAGS="$RPM_OPT_FLAGS" %(python)s setup.py build
761    '''
762    
763  bdist_rpm_install_script = '''  bdist_rpm_install_script = '''
764  %(python)s setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES \  %(python)s setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES \
765     --prefix=%(prefix)s     --prefix=%(prefix)s
# Line 771  class thuban_bdist_rpm(bdist_rpm): Line 783  class thuban_bdist_rpm(bdist_rpm):
783          # scripts such as the python interpreter to use are only known          # scripts such as the python interpreter to use are only known
784          # then.          # then.
785          open("bdist_rpm_prep", "w").close()          open("bdist_rpm_prep", "w").close()
786            open("bdist_rpm_build", "w").close()
787          open("bdist_rpm_install", "w").close()          open("bdist_rpm_install", "w").close()
788          bdist_rpm.initialize_options(self)          bdist_rpm.initialize_options(self)
789    
# Line 778  class thuban_bdist_rpm(bdist_rpm): Line 791  class thuban_bdist_rpm(bdist_rpm):
791          # create the scripts for the spec-file. Now we know the python          # create the scripts for the spec-file. Now we know the python
792          # interpreter to use.          # interpreter to use.
793          open("bdist_rpm_prep", "w").write(bdist_rpm_prep_script)          open("bdist_rpm_prep", "w").write(bdist_rpm_prep_script)
794    
795            build = bdist_rpm_build_script % {"python": self.python,
796                                              "prefix": self.prefix}
797            open("bdist_rpm_build", "w").write(build)
798    
799          install = bdist_rpm_install_script % {"python": self.python,          install = bdist_rpm_install_script % {"python": self.python,
800                                                "prefix": self.prefix}                                                "prefix": self.prefix}
801          open("bdist_rpm_install", "w").write(install)          open("bdist_rpm_install", "w").write(install)
# Line 865  class bdist_inno(Command): Line 883  class bdist_inno(Command):
883          """Execute the command. install_options if given, should be a          """Execute the command. install_options if given, should be a
884          directory of additional options to set in the install step"""          directory of additional options to set in the install step"""
885          # Obviously have to build before we can install          # Obviously have to build before we can install
886    
887          if not self.skip_build:          if not self.skip_build:
888              self.run_command('build')              self.run_command('build')
889    
# Line 977  class thuban_bdist_inno(bdist_inno): Line 996  class thuban_bdist_inno(bdist_inno):
996      def run(self):      def run(self):
997          install_options = {          install_options = {
998              "prefix": ".",              "prefix": ".",
999                "install_lib": "$base",
1000                "install_data": "$base",
1001              "install_scripts": "$base",              "install_scripts": "$base",
1002              "warn_dir": 0,              "warn_dir": 0,
1003              "extra_files": ["COPYING", "Lib/proj.dll"],              "extra_files": ["COPYING", "Lib/proj.dll"],
# Line 984  class thuban_bdist_inno(bdist_inno): Line 1005  class thuban_bdist_inno(bdist_inno):
1005          # don't make a symlink because we're simulating windows, so          # don't make a symlink because we're simulating windows, so
1006          # that we can generate the iss-file even on Linux          # that we can generate the iss-file even on Linux
1007          install_options["do_symlink"] = 0          install_options["do_symlink"] = 0
1008    
1009          bdist_inno.run(self, install_options)          bdist_inno.run(self, install_options)
1010    
1011    class thuban_build_docs(Command):
1012    
1013        """Command to generate documentation from source code."""
1014    
1015        description = "Generate documentation."
1016    
1017        user_options = []
1018    
1019        def initialize_options(self): pass
1020    
1021        def finalize_options(self): pass
1022    
1023        def run(self, install_options = None):
1024            self.spawn(["happydoc", "-d./Doc", "./Thuban"])
1025    
1026  #  #
1027  #   Run the script  #   Run the script
# Line 997  Thuban is a viewer for geographic data w Line 1033  Thuban is a viewer for geographic data w
1033  """  """
1034    
1035  setup(name = "Thuban",  setup(name = "Thuban",
1036        version = "0.1.3cvs",        version = "0.2.0",
1037        description = "Geographic data viewer",        description = "Geographic data viewer",
1038        long_description = long_description,        long_description = long_description,
1039        licence = "GPL",        licence = "GPL",
# Line 1039  setup(name = "Thuban", Line 1075  setup(name = "Thuban",
1075                    "install": ThubanInstall,                    "install": ThubanInstall,
1076                    "bdist_rpm": thuban_bdist_rpm,                    "bdist_rpm": thuban_bdist_rpm,
1077                    "bdist_inno": thuban_bdist_inno,                    "bdist_inno": thuban_bdist_inno,
1078                    "data_dist": data_dist                    "data_dist": data_dist,
1079                      "build_docs": thuban_build_docs
1080                    })                    })
1081    
1082    

Legend:
Removed from v.266  
changed lines
  Added in v.555

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26