The package_data argument is a dictionary that maps from package names to lists of glob patterns. The globs may include subdirectory names, if the data files are contained in a subdirectory of the package. For example, if the package tree looks like this: setup.
Additionally, can a Python package contain non Python files?
For non-python files to be included in an installation, they must be within one of the installed package directories. If you specify non-python files outside of your package directories in MANIFEST.in, they will be included in your distribution, but they will not be installed.
In this way, does Python install pip?
PIP is automatically installed with Python 2.7. 9+ and Python 3.4+ and it comes with the virtualenv and pyvenv virtual environments.
How do you include data in a python package?
Place the files that you want to include in the package directory (in our case, the data has to reside in the roman/ directory). Add the field include_package_data=True in setup.py . Add the field package_data={”: [… patterns for files you want to include, relative to package dir…]} in setup.py .
Is setup CFG deprecated?
Nope, setup. cfg it is not deprecated and the documentation you mention is misleading. There were serious reasons like security related to the fact that setup.py needed execution and that’s the main reason of moving away from it.
Is setup py deprecated?
You may still find advice all over the place that involves invoking setup.py directly, but unfortunately this is no longer good advice because as of the last few years all direct invocations of setup.py are effectively deprecated in favor of invocations via purpose-built and/or standards-based CLI tools like pip, build …
What is __ init __ py for?
The __init__.py file makes Python treat directories containing it as modules. Furthermore, this is the first file to be loaded in a module, so you can use it to execute code that you want to run each time a module is loaded, or specify the submodules to be exported.
What is distutils Python?
The distutils package provides support for building and installing additional modules into a Python installation. The new modules may be either 100%-pure Python, or may be extension modules written in C, or may be collections of Python packages which include modules coded in both Python and C.
What is pure Python wheel?
A universal wheel is a wheel for a pure-Python project that supports both Python 2 and 3. There are multiple ways to tell setuptools and distutils that a wheel should be universal. Option 1 is to specify the option in your project’s setup.cfg file: [bdist_wheel] universal = 1.
What is setup CFG Python?
setup. cfg is a cheekily named Python package which supports providing all of a Python distribution’s metadata and build configuration via the setup. cfg file at the base of the distribution’s source tree, rather than in the setup.py script. The standard setup.py script is reduced to a stub which uses the setup.