mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
setup: copy in this fix from zetuptoolz and the accompanying new version number of zetuptoolz: http://tahoe-lafs.org/trac/zetuptoolz/ticket/1
This commit is contained in:
parent
0475bd8e27
commit
84cd0d991a
@ -6,8 +6,10 @@ from setuptools.depends import Require
|
||||
from distutils.core import Command as _Command
|
||||
from distutils.util import convert_path
|
||||
import os.path
|
||||
import os
|
||||
import sys
|
||||
|
||||
__version__ = '0.6c16dev'
|
||||
__version__ = '0.6c16dev2'
|
||||
__all__ = [
|
||||
'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
|
||||
'find_packages'
|
||||
@ -80,3 +82,9 @@ import distutils.filelist
|
||||
distutils.filelist.findall = findall # fix findall bug in distutils.
|
||||
|
||||
|
||||
# sys.dont_write_bytecode was introduced in Python 2.6.
|
||||
if ((hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) or
|
||||
(not hasattr(sys, "dont_write_bytecode") and os.environ.get("PYTHONDONTWRITEBYTECODE"))):
|
||||
_dont_write_bytecode = True
|
||||
else:
|
||||
_dont_write_bytecode = False
|
@ -11,7 +11,7 @@ __ http://peak.telecommunity.com/DevCenter/EasyInstall
|
||||
"""
|
||||
import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random
|
||||
from glob import glob
|
||||
from setuptools import Command
|
||||
from setuptools import Command, _dont_write_bytecode
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools.sandbox import run_setup
|
||||
from distutils import log, dir_util
|
||||
@ -1008,6 +1008,9 @@ See the setuptools documentation for the "develop" command for more info.
|
||||
chmod(f, mode)
|
||||
|
||||
def byte_compile(self, to_compile):
|
||||
if _dont_write_bytecode:
|
||||
self.warn('byte-compiling is disabled, skipping.')
|
||||
return
|
||||
from distutils.util import byte_compile
|
||||
try:
|
||||
# try to make the byte compile messages quieter
|
Loading…
Reference in New Issue
Block a user