Skip to content

Commit b917479

Browse files
author
Georgi Valkov
committed
s/reproducibility/reproducible
1 parent 6b4e8ef commit b917479

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

setup.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
ecodes_c_path = curdir / "src/evdev/ecodes.c"
1515

1616

17-
def create_ecodes(headers=None, reproducibility=False):
17+
def create_ecodes(headers=None, reproducible=False):
1818
if not headers:
1919
include_paths = set()
2020
cpath = os.environ.get("CPATH", "").strip()
@@ -66,8 +66,8 @@ def create_ecodes(headers=None, reproducibility=False):
6666
print("writing %s (using %s)" % (ecodes_c_path, " ".join(headers)))
6767
with ecodes_c_path.open("w") as fh:
6868
cmd = [sys.executable, "src/evdev/genecodes_c.py"]
69-
if reproducibility:
70-
cmd.append("--reproducibility")
69+
if reproducible:
70+
cmd.append("--reproducible")
7171
cmd.extend(["--ecodes", *headers])
7272
run(cmd, check=True, stdout=fh)
7373

@@ -77,21 +77,21 @@ class build_ecodes(Command):
7777

7878
user_options = [
7979
("evdev-headers=", None, "colon-separated paths to input subsystem headers"),
80-
("reproducibility", None, "hide host details (host/paths) to create a reproducible output"),
80+
("reproducible", None, "hide host details (host/paths) to create a reproducible output"),
8181
]
8282

8383
def initialize_options(self):
8484
self.evdev_headers = None
85-
self.reproducibility = False
85+
self.reproducible = False
8686

8787
def finalize_options(self):
8888
if self.evdev_headers:
8989
self.evdev_headers = self.evdev_headers.split(":")
90-
if self.reproducibility is None:
91-
self.reproducibility = False
90+
if self.reproducible is None:
91+
self.reproducible = False
9292

9393
def run(self):
94-
create_ecodes(self.evdev_headers, reproducibility=self.reproducibility)
94+
create_ecodes(self.evdev_headers, reproducible=self.reproducible)
9595

9696

9797
class build_ext(_build_ext.build_ext):

src/evdev/genecodes_c.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
"/usr/include/linux/uinput.h",
1616
]
1717

18-
opts, args = getopt.getopt(sys.argv[1:], "", ["ecodes", "stubs", "reproducibility"])
18+
opts, args = getopt.getopt(sys.argv[1:], "", ["ecodes", "stubs", "reproducible"])
1919
if not opts:
20-
print("usage: genecodes.py [--ecodes|--stubs] [--reproducibility] <headers>")
20+
print("usage: genecodes.py [--ecodes|--stubs] [--reproducible] <headers>")
2121
exit(2)
2222

2323
if args:
2424
headers = args
2525

26-
reproducibility = ("--reproducibility", "") in opts
26+
reproducible = ("--reproducible", "") in opts
2727

2828

2929
# -----------------------------------------------------------------------------
3030
macro_regex = r"#define\s+((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF|INPUT_PROP)_\w+)"
3131
macro_regex = re.compile(macro_regex)
3232

33-
if reproducibility:
33+
if reproducible:
3434
uname = "hidden for reproducibility"
3535
else:
3636
# Uname without hostname.
@@ -143,5 +143,5 @@ def parse_headers(headers=headers):
143143
template = template_stubs
144144

145145
body = os.linesep.join(body)
146-
text = template % (uname, headers if not reproducibility else ["hidden for reproducibility"], body)
146+
text = template % (uname, headers if not reproducible else ["hidden for reproducibility"], body)
147147
print(text.strip())

0 commit comments

Comments
 (0)