diff --git a/chip_data/setup.py b/chip_data/setup.py
index 4fa62a7..c6cbec1 100644
--- a/chip_data/setup.py
+++ b/chip_data/setup.py
@@ -1,4 +1,5 @@
 import os
+import sys
 
 from parse_chip_data import gen_peltool_json
 from setuptools import setup
@@ -24,22 +25,24 @@
 # Windows. Setuptools will automatically convert the slashes where appropriate.
 package_data_glob = "/".join(data_dir_components)
 
+# These are the possible chip config options to build the PEL parser data json
+# from. By default all configs will be built. The '--chip-config' option can be
+# used in recipes to specify manually.
+chipConfig = ["p10_10", "p10_20", "explorer", "odyssey"]
+
+# The chip-config option is manually handled here, rather than added as a custom
+# option in the my_build_py class to facilitate use with setuptools which will
+# use bdist_wheel in the build. There is currently not a way to indicate a
+# option only for the custom build_py through bdist_wheel. As such the option
+# will be handled generically here with the chipConfig variable only used in the
+# custom build class.
+if "--chip-config" in sys.argv:
+    chipConfig = sys.argv.pop(sys.argv.index("--chip-config") + 1).split(",")
+    sys.argv.remove("--chip-config")
+
 
 # This is a custom build class that is used to dynamically build the data files.
 class my_build_py(build_py):
-    user_options = build_py.user_options + [
-        ("chipConfig=", None, "List of chip IDs to build PEL parser JSON")
-    ]
-
-    def initialize_options(self):
-        # Default chip_config option is all valid chip types
-        self.chipConfig = ["p10_10", "p10_20", "explorer", "odyssey"]
-        return super().initialize_options()
-
-    def finalize_options(self):
-        if not isinstance(self.chipConfig, list):
-            self.chipConfig = self.chipConfig.split(",")
-        return super().finalize_options()
 
     def run(self):
         if not self.dry_run:  # honor --dry-run flag
@@ -50,7 +53,7 @@
             self.mkpath(data_dir)
 
             # Generate the PEL parser data JSON from the Chip Data XML.
-            for chip in self.chipConfig:
+            for chip in chipConfig:
                 gen_peltool_json(chip, data_dir)
 
         # Call the superclass run() to ensure everything else builds.
