2011-10-29 17:56:51 +02:00
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
import sys
|
2017-05-16 12:16:30 +02:00
|
|
|
|
from distutils.core import setup
|
|
|
|
|
|
2011-10-29 17:56:51 +02:00
|
|
|
|
|
|
|
|
|
class FakeError(Exception):
|
|
|
|
|
pass
|
|
|
|
|
|
2021-08-13 15:23:45 +02:00
|
|
|
|
|
2023-03-18 14:47:21 +01:00
|
|
|
|
if sys.argv[1] in ("install", "bdist_wheel"):
|
2021-08-13 15:23:45 +02:00
|
|
|
|
if hasattr(sys.stdout, "buffer"):
|
|
|
|
|
sys.stdout.buffer.write(
|
|
|
|
|
"\nThis package prints out UTF-8 stuff like:\n".encode("utf-8")
|
|
|
|
|
)
|
|
|
|
|
sys.stdout.buffer.write(
|
|
|
|
|
"* return type of ‘main’ is not ‘int’\n".encode("utf-8")
|
|
|
|
|
)
|
|
|
|
|
sys.stdout.buffer.write(
|
|
|
|
|
"* Björk Guðmundsdóttir [ˈpjœr̥k ˈkvʏðmʏntsˌtoʊhtɪr]".encode("utf-8")
|
|
|
|
|
)
|
2011-10-29 17:56:51 +02:00
|
|
|
|
else:
|
|
|
|
|
pass
|
2021-08-13 15:23:45 +02:00
|
|
|
|
sys.stdout.write("\nThis package prints out UTF-8 stuff like:\n")
|
|
|
|
|
sys.stdout.write(
|
|
|
|
|
"* return type of \xe2\x80\x98main\xe2\x80\x99 is not \xe2\x80\x98int\xe2\x80\x99\n"
|
|
|
|
|
)
|
|
|
|
|
sys.stdout.write(
|
|
|
|
|
"* Bj\xc3\xb6rk Gu\xc3\xb0mundsd\xc3\xb3ttir [\xcb\x88pj\xc5\x93r\xcc\xa5k \xcb\x88kv\xca\x8f\xc3\xb0m\xca\x8fnts\xcb\x8cto\xca\x8aht\xc9\xaar]\n"
|
|
|
|
|
)
|
2011-10-29 17:56:51 +02:00
|
|
|
|
|
2021-08-13 15:23:45 +02:00
|
|
|
|
raise FakeError("this package designed to fail on install")
|
2011-10-29 17:56:51 +02:00
|
|
|
|
|
2021-08-13 15:23:45 +02:00
|
|
|
|
setup(
|
|
|
|
|
name="broken",
|
|
|
|
|
version="0.2",
|
|
|
|
|
py_modules=["broken"],
|
|
|
|
|
)
|