[pytango] 303/483: fix errors on windows

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit b8ea2ebe888e4eab56a93951371419a6189680e4
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Sun Nov 17 10:04:41 2013 +0000

    fix errors on windows
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@24232 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 scripts/winpostinstall.py       | 75 -----------------------------------------
 setup.py                        |  9 +++--
 win/PyTango_VS10/PyTango.props  | 11 ++++--
 win/PyTango_VS9/PyTango.vcproj  |  1 +
 win/PyTango_VS9/PyTango.vsprops |  2 +-
 winsetup.py                     |  6 ++--
 6 files changed, 18 insertions(+), 86 deletions(-)

diff --git a/scripts/winpostinstall.py b/scripts/winpostinstall.py
deleted file mode 100644
index 4c698e7..0000000
--- a/scripts/winpostinstall.py
+++ /dev/null
@@ -1,75 +0,0 @@
-from __future__ import print_function
-
-import sys
-import os
-import os.path
-
-import urllib
-try:
-    urlretrieve = urllib.urlretrieve
-except AttributeError:
-    import urllib.request
-    urlretrieve = urllib.urlrequest.urlretrieve
-
-try:
-    file_created
-except:
-    def file_created(*args, **kwargs): pass
-
-def find_tango_root():
-    program_files = os.environ["PROGRAMFILES"]
-    tango = os.path.join(program_files, 'tango')
-    if os.path.isdir(tango):
-        return tango
-
-def find_tango_dll():
-    program_files = os.environ["PROGRAMFILES"]
-    tangodll = os.path.join(program_files, 'tango','win32','lib','vc9_dll')
-    if os.path.isdir(tangodll):
-        return tangodll
-
-def install_tango_dll():
-    pytango_web = "http://www.tango-controls.org/static/PyTango/"
-    print("Fetching appropriate tango from " + pytango_web+ "...")
-    pytango_dll_path = pytango_web + "tangodll/"
-    pytango_dll_file = pytango_dll_path + "tango_8.0_win32_vc9_dll.zip"
-    filename, headers = urlretrieve(pytango_dll_file)
-    import distutils.sysconfig
-    import zipfile
-    pytango_dll_zip = zipfile.ZipFile(filename)
-    pytango_dir = distutils.sysconfig.get_python_lib()
-    pytango_dir = os.path.join(pytango_dir, "PyTango")
-    print("Extracting " + filename + " into " + pytango_dir + "...")
-    pytango_dll_zip.extractall(pytango_dir)
-    print("Registering all files...")
-    for name in pytango_dll_zip.namelist():
-        print("Registering " + name)
-        name = os.path.join(pytango_dir, name)
-        file_created(name)
-    
-def remove():
-    print ("removing PyTango")
-    
-def install():
-    print ("installing PyTango")
-
-def main():
-    if len(sys.argv) < 2:
-        op = "-install"
-    else:
-        op = sys.argv[1]
-    
-    if "-install" in op:
-        install()
-    elif "-remove" in op:
-        remove()
-    else:
-        print("unknown operation " + op)
- 
-if __name__ == "__main__":
-    try:
-        main()
-    except:
-        import traceback
-        traceback.print_exc()
-        raw_input("Press any key to continue")
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 0e3ecda..ee351be 100644
--- a/setup.py
+++ b/setup.py
@@ -157,7 +157,9 @@ def add_lib(name, dirs, sys_libs, lib_name=None, inc_suffix=None):
             lib_dir = os.path.join(ENV, 'lib64')
             if not os.path.isdir(lib_dir):
                 lib_dir = os.path.join(ENV, 'lib')
-
+        else:
+            lib_dir = os.path.join(ENV, 'lib')
+        
         if lib_name.startswith('lib'):
             lib_name = lib_name[3:]
         dirs['include_dirs'].append(inc_dir)
@@ -327,7 +329,7 @@ def main():
                        library_dirs=[],
                        libraries=[])
     sys_libs = []
-
+    
     add_lib('omni', directories, sys_libs, lib_name='omniORB4')
     add_lib('zmq', directories, sys_libs, lib_name='libzmq')
     add_lib('tango', directories, sys_libs, inc_suffix='tango')
@@ -370,7 +372,8 @@ def main():
     else:
         macros.append(('DISABLE_PYTANGO_NUMPY', None))
 
-    directories = pkg_config(*sys_libs, **directories)
+    if 'posix' in os.name:
+        directories = pkg_config(*sys_libs, **directories)
     
     Release = get_release_info()
 
diff --git a/win/PyTango_VS10/PyTango.props b/win/PyTango_VS10/PyTango.props
index 4adfc86..5b64e88 100755
--- a/win/PyTango_VS10/PyTango.props
+++ b/win/PyTango_VS10/PyTango.props
@@ -3,9 +3,14 @@
   <PropertyGroup Label="UserMacros">
     <PyTangoBaseFile>_PyTango</PyTangoBaseFile>
     <TangoMajorVer>8</TangoMajorVer>
-    <TangoMinorVer>0</TangoMinorVer>
-    <TangoPatchVer>5</TangoPatchVer>
+    <TangoMinorVer>1</TangoMinorVer>
+    <TangoPatchVer>2</TangoPatchVer>
     <TangoVer>$(TangoMajorVer).$(TangoMinorVer).$(TangoPatchVer)</TangoVer>
+    <PyTangoMajorVer>8</PyTangoMajorVer>
+    <PyTangoMinorVer>1</PyTangoMinorVer>
+    <PyTangoPatchVer>1</PyTangoPatchVer>
+    <PyTangoVer>$(PyTangoMajorVer).$(PyTangoMinorVer).$(PyTangoPatchVer)</PyTangoVer>
+
     <BoostMajorVer>1</BoostMajorVer>
     <BoostMinorVer>53</BoostMinorVer>
     <BoostPatchVer>0</BoostPatchVer>
@@ -25,7 +30,7 @@
     <PyTangoCompileOptions>-Zm200 /MP2 /bigobj</PyTangoCompileOptions>
     <BaseDir>$(ProjectDir)..\..</BaseDir>
     <RelPrefixDir>$(Configuration)_$(Platform)_msvc$(VCVer)</RelPrefixDir>
-    <BaseBuildDir>c:\temp\pytango\build</BaseBuildDir>
+    <BaseBuildDir>c:\temp\pytango\build_$(PyTangoVer)_tg$(TangoVer)_boost$(BoostVer)</BaseBuildDir>
     <BaseBuildLibDir>$(BaseBuildDir)\lib</BaseBuildLibDir>
     <BaseTempDir>$(BaseBuildDir)\temp</BaseTempDir>
     <BaseDistDir>$(BaseBuildDir)\dist</BaseDistDir>
diff --git a/win/PyTango_VS9/PyTango.vcproj b/win/PyTango_VS9/PyTango.vcproj
index d3ebad3..7cde0e2 100644
--- a/win/PyTango_VS9/PyTango.vcproj
+++ b/win/PyTango_VS9/PyTango.vcproj
@@ -809,6 +809,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(PyTango27StaticLibs)"
 				AdditionalLibraryDirectories="$(Py27BoostStaticTangoStaticLibDir)"
+				IgnoreDefaultLibraryNames=""
 				LinkTimeCodeGeneration="1"
 				TargetMachine="17"
 			/>
diff --git a/win/PyTango_VS9/PyTango.vsprops b/win/PyTango_VS9/PyTango.vsprops
index 8abaa06..f4b1f69 100644
--- a/win/PyTango_VS9/PyTango.vsprops
+++ b/win/PyTango_VS9/PyTango.vsprops
@@ -99,7 +99,7 @@
 
     <UserMacro Name="PyTangoMajorVer" Value="8" />
     <UserMacro Name="PyTangoMinorVer" Value="1" />
-    <UserMacro Name="PyTangoPatchVer" Value="0" />
+    <UserMacro Name="PyTangoPatchVer" Value="1" />
     <UserMacro Name="PyTangoVer" Value="$(PyTangoMajorVer).$(PyTangoMinorVer).$(PyTangoPatchVer)" />
 
     <UserMacro Name="BoostMajorVer" Value="1" />
diff --git a/winsetup.py b/winsetup.py
index f05541e..30ac42f 100644
--- a/winsetup.py
+++ b/winsetup.py
@@ -55,15 +55,13 @@ def main():
         cmd_line += 'bdist_msi --skip-build --target-version=%s ' \
                     '--bdist-dir=%s ' \
                     '--dist-dir=%s ' \
-                    '--plat-name=%s ' \
-                    '--install-script=winpostinstall.py ' % (ver, bdist_dir, dist_dir, plat_name)
+                    '--plat-name=%s ' % (ver, bdist_dir, dist_dir, plat_name)
         cmd_line += 'bdist_wininst --skip-build --target-version=%s ' \
                     '--bdist-dir=%s ' \
                     '--dist-dir=%s ' \
                     '--title="PyTango 8" ' \
                     '--bitmap="%s" ' \
-                    '--plat-name=%s ' \
-                    '--install-script=winpostinstall.py ' % (ver, bdist_dir, dist_dir, bitmap, plat_name)
+                    '--plat-name=%s ' % (ver, bdist_dir, dist_dir, bitmap, plat_name)
         os.system(cmd_line)
     except:
         print("Failed:")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list