Skip to content

Commit efeb155

Browse files
committed
revert setup.py formatting
1 parent f32aa9b commit efeb155

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

setup.py

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,87 +18,92 @@
1818
# under the License.
1919
#
2020

21-
import platform
22-
from distutils.command import build_ext
21+
from setuptools import setup
2322
from distutils.core import Extension
2423
from os import environ, path
24+
import platform
2525

26-
from setuptools import setup
26+
from distutils.command import build_ext
2727

2828

2929
def get_version():
3030
root = path.dirname(path.realpath(__file__))
31-
version_file = path.join(root, "pulsar", "__about__.py")
31+
version_file = path.join(root, 'pulsar', '__about__.py')
3232
version = {}
3333
with open(version_file) as fp:
3434
exec(fp.read(), version)
35-
return version["__version__"]
35+
return version['__version__']
3636

3737

3838
def get_name():
39-
postfix = environ.get("NAME_POSTFIX", "")
40-
base = "pulsar-client"
39+
postfix = environ.get('NAME_POSTFIX', '')
40+
base = 'pulsar-client'
4141
return base + postfix
4242

4343

4444
VERSION = get_version()
4545
NAME = get_name()
4646

47-
print("NAME: %s" % NAME)
48-
print("VERSION: %s" % VERSION)
47+
print('NAME: %s' % NAME)
48+
print('VERSION: %s' % VERSION)
4949

5050

5151
# This is a workaround to have setuptools to include
5252
# the already compiled _pulsar.so library
5353
class my_build_ext(build_ext.build_ext):
5454
def build_extension(self, ext):
55-
import os.path
5655
import shutil
56+
import os.path
5757

5858
try:
5959
os.makedirs(os.path.dirname(self.get_ext_fullpath(ext.name)))
6060
except OSError as e:
6161
if e.errno != 17: # already exists
6262
raise
63-
if "Windows" in platform.platform():
64-
shutil.copyfile("_pulsar.pyd", self.get_ext_fullpath(ext.name))
63+
if 'Windows' in platform.platform():
64+
shutil.copyfile('_pulsar.pyd', self.get_ext_fullpath(ext.name))
6565
else:
6666
try:
67-
shutil.copyfile("_pulsar.so", self.get_ext_fullpath(ext.name))
67+
shutil.copyfile('_pulsar.so', self.get_ext_fullpath(ext.name))
6868
except FileNotFoundError:
69-
shutil.copyfile("lib_pulsar.so", self.get_ext_fullpath(ext.name))
69+
shutil.copyfile('lib_pulsar.so', self.get_ext_fullpath(ext.name))
7070

7171

7272
# Core Client dependencies
7373
dependencies = [
74-
"certifi",
74+
'certifi',
7575
]
7676

7777
extras_require = {}
7878

7979
# functions dependencies
8080
extras_require["functions"] = sorted(
8181
{
82-
"protobuf>=3.6.1",
83-
"grpcio>=1.59.3",
84-
"apache-bookkeeper-client>=4.16.1",
85-
"prometheus_client",
86-
"ratelimit",
82+
"protobuf>=3.6.1",
83+
"grpcio>=1.59.3",
84+
"apache-bookkeeper-client>=4.16.1",
85+
"prometheus_client",
86+
"ratelimit"
8787
}
8888
)
8989

9090
# avro dependencies
91-
extras_require["avro"] = sorted({"fastavro>=1.9.2"})
91+
extras_require["avro"] = sorted(
92+
{
93+
"fastavro>=1.9.2"
94+
}
95+
)
9296

9397
# all dependencies
9498
extras_require["all"] = sorted(set(sum(extras_require.values(), [])))
9599

96100
setup(
97101
name=NAME,
98102
version=VERSION,
99-
packages=["pulsar", "pulsar.schema", "pulsar.functions"],
100-
cmdclass={"build_ext": my_build_ext},
101-
ext_modules=[Extension("_pulsar", [])],
103+
packages=['pulsar', 'pulsar.schema', 'pulsar.functions'],
104+
cmdclass={'build_ext': my_build_ext},
105+
ext_modules=[Extension('_pulsar', [])],
106+
102107
author="Pulsar Devs",
103108
author_email="dev@pulsar.apache.org",
104109
description="Apache Pulsar Python client library",

0 commit comments

Comments
 (0)