I have a python package I made. It uses datetime
in multiple places. I notice that on a brand-new python install, I can do import datetime
without issue. Thus, python comes with datetime
built-in.
If I put datetime
in my setup.py as one of the items in install_requires
, it appears to download the pypi package datetime
, even though the builtin package is already available. In some cases, such as with multiprocessing
, the pypi package might require extra things (in the case of the pypimultiprocessing
, it requires gcc-c++
to be installed on my CentOS, while the builtin multiprocessing
has no such requirements).
Questions:
install_requires
if I use them?virtualenv
and trying to import things?it appears to download the pypi package datetime
Not exactly. It downloads a package called DateTime
with top-level name DateTime
, not datetime
.
Should I include builtin packages under
install_requires
if I use them?
No. install_requires
is intended to list external, 3rd-party packages, not the builtin ones, not the standard ones.
Is there an easier way of seeing which packages are builtin and which aren't?
One is datetime
, the other is DateTime
.
Who owns the pypi versions of these builtin packages?
The page https://pypi.org/project/DateTime/ name the author: Zope Foundation and Contributors. And list the current maintainers. The homepage listed is https://github.com/zopefoundation/DateTime