Fine let’s rule out “None” which indeed is confusing, users could indeed register an extra environment called “None” for whatever reason.
If you look at how pip currently handles package resolution, you literally have extra is None when no extra is specified: https://github.com/pypa/pip/blob/master/src/pip/_vendor/packaging/markers.py#L107
So IMHO, it is already implemented that way. We just need to allow users to create an environment called None.
For now the following will fail:
from setuptools import setup
extras_require = {
None: ["numpy"]
}
setup(
name='test_pkg',
version='1.0.0',
extras_require=extras_require,
)
Which leads to:
$ python setup.py bdist_wheel
error in test_pkg setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
Similarly, ":extra==''" is in my opinion perfectly understandable since the following is perfectly legal:
from setuptools import setup
extras_require = {
':python_version>"3.4"': ["numpy"]
}
setup(
name='test_pkg',
version='1.0.0',
extras_require=extras_require,
)
Which gives the following METADATA file:
Metadata-Version: 2.1
Name: test-pkg
Version: 1.0.0
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN
Requires-Dist: numpy ; python_version>"3.4"
UNKNOWN