Skip to content

Commit

Permalink
Some changes after running tox
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldoussoren committed May 24, 2022
1 parent bad3ccb commit 7e9e569
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion py2app/apptemplate/lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
USER_SITE = None
USER_BASE = None

import os
import os # noqa: E402

try:
basestring
Expand Down
1 change: 0 additions & 1 deletion py2app/converters/nibfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from py2app.decorators import converts
from py2app.util import check_output, reset_blocking_status


gTool = None


Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/PIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def check(cmd, mf):
plugins = set()
visited = set()

# XXX: Most users should now use Pillow, which always uses
# Most users should now use Pillow, which always uses
# "PIL.Image", which can simply the code below.
for folder in sys.path:
if not isinstance(folder, basestring):
Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/setuptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def find_eggs_in_zip(importer, path_item, only=False):
subpath = os.path.join(path_item, subitem)
submeta = pkg_resources.EggMetadata(zipimport.zipimporter(subpath))
submeta.egg_info = subpath
yield pkg_resources.Distribution.from_location(path_item, subitem, submeta)
yield pkg_resources.Distribution.from_location(path_item, subitem, submeta) # noqa: B950
def _fixup_pkg_resources():
pkg_resources.register_finder(zipimport.zipimporter, find_eggs_in_zip)
Expand Down
11 changes: 7 additions & 4 deletions py2app/util.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from __future__ import print_function

import contextlib
import errno
import fcntl
import os
import stat
import subprocess
import sys
import time
import warnings
import zipfile
import contextlib
import fcntl
from distutils import log

import macholib.util
Expand Down Expand Up @@ -848,6 +848,7 @@ def codesign_adhoc(bundle):
time.sleep(1)
continue


@contextlib.contextmanager
def reset_blocking_status():
"""
Expand All @@ -856,7 +857,9 @@ def reset_blocking_status():
xcode tools, mostly because ibtool tends to set the
std* streams to non-blocking.
"""
orig_nonblocking = [fcntl.fcntl(fd, fcntl.F_GETFL) & os.O_NONBLOCK for fd in (0, 1, 2)]
orig_nonblocking = [
fcntl.fcntl(fd, fcntl.F_GETFL) & os.O_NONBLOCK for fd in (0, 1, 2)
]

try:
yield
Expand All @@ -870,5 +873,5 @@ def reset_blocking_status():
reset = cur & ~os.O_NONBLOCK

if cur != reset:
print("Resetting blocking status of %s" %(fd,))
print("Resetting blocking status of %s" % (fd,))
fcntl.fcntl(fd, fcntl.F_SETFL, reset)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import os
import sys
import unittest
from distutils import log
from fnmatch import fnmatch

from setuptools import Command, find_packages, setup
from setuptools.command import egg_info
from distutils import log

fp = open("README.rst")
try:
Expand Down

0 comments on commit 7e9e569

Please sign in to comment.