Added .bat files to test and build under Windows systems; adjusted ignore, setup and Makefiles for this platform.

This commit is contained in:
Bastian Kleineidam 2010-03-01 16:01:23 +01:00
parent f93e24a280
commit a4dcaf0f4c
5 changed files with 48 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.pyc
*.pyo
/build
/dist

View File

@ -43,7 +43,7 @@ count:
clean:
find . -name \*.pyc -delete
find . -name \*.pyo -delete
rm -rf build
rm -rf build dist
.PHONY: test
test:

20
dist.bat Executable file
View File

@ -0,0 +1,20 @@
:: Create patool Windows distribution file
:: Copyright (C) 2010 Bastian Kleineidam
:: This program is free software: you can redistribute it and/or modify
:: it under the terms of the GNU General Public License as published by
:: the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
@echo off
set PYDIR=c:\python26
rd build /s /q
rd dist /s /q
%PYDIR%\python.exe setup.py bdist_wininst
pause

View File

@ -22,7 +22,7 @@ import sys
if not (hasattr(sys, 'version_info') or
sys.version_info < (2, 5, 0, 'final', 0)):
raise SystemExit("This program requires Python 2.5 or later.")
import os
from distutils.core import setup
AppName = "patool"
@ -30,6 +30,12 @@ AppVersion = "0.3"
MyName = "Bastian Kleineidam"
MyEmail = "calvin@users.sourceforge.net"
data_files = []
if os.name == 'nt':
data_files.append(('share', ['doc/patool.txt']))
else:
data_files.append(('share/man/man1', ['doc/patool.1']))
setup (
name = AppName,
version = AppVersion,
@ -40,8 +46,6 @@ setup (
maintainer_email = MyEmail,
license = "GPL",
packages = ['patoolib', 'patoolib.programs'],
data_files = [
('share/man/man1', ['doc/patool.1']),
],
data_files = data_files,
scripts = ['patool'],
)

18
test.bat Executable file
View File

@ -0,0 +1,18 @@
:: Run patool test suite
:: Copyright (C) 2010 Bastian Kleineidam
:: This program is free software: you can redistribute it and/or modify
:: it under the terms of the GNU General Public License as published by
:: the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
@echo off
set PYDIR=C:\Python26
%PYDIR%\python.exe %PYDIR%\scripts\nosetests -v -m "^test_.*" tests/
@pause