From 16ccc78775b96da06b52be3231e75c9c8f9b8fd2 Mon Sep 17 00:00:00 2001 From: calvin Date: Mon, 11 Sep 2000 07:51:32 +0000 Subject: [PATCH] win32 fixes git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@158 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- Makefile | 1 + linkcheck/MailtoUrlData.py | 5 +++-- linkchecker.bat.tmpl | 42 +++++++++++++++++++------------------- setup.py | 5 +++++ 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index b456f788..0a808285 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,7 @@ distclean: clean dist: mo rm -rf debian/tmp python setup.py sdist --formats=gztar,zip bdist_rpm + python setup.py bdist_wininst fakeroot debian/rules binary mv -f ../$(DEBPACKAGE) dist diff --git a/linkcheck/MailtoUrlData.py b/linkcheck/MailtoUrlData.py index 18017e5d..65bb369b 100644 --- a/linkcheck/MailtoUrlData.py +++ b/linkcheck/MailtoUrlData.py @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ -import re,string,DNS,sys,Config,cgi,urllib,linkcheck +import os,re,string,DNS,sys,Config,cgi,urllib,linkcheck from rfc822 import AddressList from HostCheckingUrlData import HostCheckingUrlData from smtplib import SMTP @@ -27,7 +27,8 @@ headers = r"\?(%s=%s(&%s=%s)*)$" % (word, word, word, word) headers_re = re.compile(headers) # parse /etc/resolv.conf (only on UNIX systems) -DNS.ParseResolvConf() +if os.name=='posix': + DNS.ParseResolvConf() class MailtoUrlData(HostCheckingUrlData): "Url link with mailto scheme" diff --git a/linkchecker.bat.tmpl b/linkchecker.bat.tmpl index f4e73f82..abeeecff 100644 --- a/linkchecker.bat.tmpl +++ b/linkchecker.bat.tmpl @@ -1,21 +1,21 @@ -@echo off -rem Copyright (C) 2000 Bastian Kleineidam -rem -rem This program is free software; you can redistribute it and/or modify -rem it under the terms of the GNU General Public License as published by -rem the Free Software Foundation; either version 2 of the License, or -rem (at your option) any later version. -rem -rem This program is distributed in the hope that it will be useful, -rem but WITHOUT ANY WARRANTY; without even the implied warranty of -rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -rem GNU General Public License for more details. -rem -rem You should have received a copy of the GNU General Public License -rem along with this program; if not, write to the Free Software -rem Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -rem uncomment the next line to enable german output -rem set LC_MESSAGES=de -rem Limited to 9 parameters? Is there a $* for Windows? -python "$install_scripts\linkchecker" %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off +rem Copyright (C) 2000 Bastian Kleineidam +rem +rem This program is free software; you can redistribute it and/or modify +rem it under the terms of the GNU General Public License as published by +rem the Free Software Foundation; either version 2 of the License, or +rem (at your option) any later version. +rem +rem This program is distributed in the hope that it will be useful, +rem but WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +rem GNU General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, write to the Free Software +rem Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +rem uncomment the next line to enable german output +rem set LC_MESSAGES=de +rem Limited to 9 parameters? Is there a $* for Windows? +"$python" "$install_scripts\linkchecker" %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/setup.py b/setup.py index 518b4040..9bd57a62 100755 --- a/setup.py +++ b/setup.py @@ -48,6 +48,11 @@ class LCDistribution(Distribution): Distribution.run_commands(self) def check_ssl(self): + if 'bdist_wininst' in self.commands and os.name!='nt': + self.announce( +"""bdist_wininst command found on non-Windows platform. +Disabling SSL compilation""") + return ok = 0 c = self.get_command_obj('build_ext') c.ensure_finalized()