Mercurial > ~astiob > upreckon > hgweb
view setup.py @ 205:166a23999bf7
Added confvar okexitcodemask; changed the validator protocol
Callable validators now return three-tuples (number granted, bool correct,
str comment) instead of two-tuples (number granted, str comment). They are
still allowed to return single numbers.
Callable validators must now explicitly raise
upreckon.exceptions.WrongAnswer if they want the verdict to be Wrong
Answer rather than Partly Correct.
okexitcodemask specifies a bitmask ANDed with the exit code of the
external validator to get a boolean flag showing whether the answer is to
be marked as 'OK' rather than 'partly correct'. The bits covered by the
bitmask are reset to zeroes before devising the number of points granted
from the resulting number.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Wed, 17 Aug 2011 20:44:54 +0300 |
parents | fe03964896ef |
children | ad4362bf9858 9d21cef40e5a |
line wrap: on
line source
#! /usr/bin/env python try: from setuptools import setup, Extension from setuptools.command.build_ext import build_ext except ImportError: from distutils.core import setup, Extension from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError from distutils import log import os class build_opt_ext(build_ext): def build_extension(self, ext): try: build_ext.build_extension(self, ext) except CCompilerError: log.warn("failed to build native extension %s (skipping)", ext.name) scripts = ['upreckon/upreckon'] if os.name == 'nt': scripts.append('upreckon/upreckon.cmd') if os.name == 'posix': ext_modules = [Extension('upreckon._unix', sources=['upreckon/_unixmodule.cpp'])] else: ext_modules = [] setup(name='upreckon', version='2.03.0dev', author='Oleg Oshmyan', author_email='chortos@inbox.lv', url='http://chortos.selfip.net/~astiob/upreckon/', #description='', #long_description='', download_url='https://bitbucket.org/astiob/upreckon/downloads', #platforms=(), #license='', classifiers=( 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: Freely Distributable', 'Natural Language :: English', 'Operating System :: Microsoft :: Windows', 'Operating System :: OS Independent', 'Operating System :: POSIX', 'Programming Language :: C', 'Programming Language :: C++', 'Programming Language :: Python', 'Programming Language :: Python :: 2', #'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Programming Language :: Python :: 3.2', 'Topic :: Software Development :: Testing', 'Topic :: Utilities', ), ext_modules=ext_modules, packages=['upreckon'], scripts=scripts, cmdclass={'build_ext': build_opt_ext}, )