lordgamez commented on code in PR #1721:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1721#discussion_r1514068298


##########
extensions/python/PYTHON.md:
##########
@@ -155,10 +158,33 @@ In the flow configuration these Python processors can be 
referenced by their ful
 
 Due to some differences between the NiFi and MiNiFi C++ processors and 
implementation, there are some limitations using the NiFi Python processors:
 - Record based processors are not yet supported in MiNiFi C++, so the NiFi 
Python processors inherited from RecordTransform are not supported.
-- Virtualenv support is not yet available in MiNiFi C++, so all required 
packages must be installed on the system.
 - Controller properties are not supported at the moment.
 - There are some validators in NiFi that are not present in MiNiFi C++, so 
some property validations will be missing using the NiFi Python processors.
 - Allowable values specified in NiFi Python processors are ignored in MiNiFi 
C++ (due to MiNiFi C++ requiring them to be specified at compile time), so the 
property values are not pre-verified.
 - MiNiFi C++ only supports expression language with flow file attributes, so 
only FLOWFILE_ATTRIBUTES expression language scope is supported, otherwise the 
expression language will not be evaluated.
 - MiNiFi C++ does not support property dependencies, so the property 
dependencies will be ignored. If a property depends on another property, the 
property will not be required.
 - MiNiFi C++ does not support the use of self.jvm member in Python processors 
that provides JVM bindings in NiFi, it is set to None in MiNiFi C++.
+- Inline definition of Python package dependencies, defined in the 
ProcessorDetails nested class are not supported as in NiFi, so the dependencies 
must be defined in the requirements.txt files. If a processor's dependencies 
are defined in the ProcessorDetails class, the dependencies should be copied to 
the requirements.txt file.
+
+## Use Python processors from virtualenv
+
+It is possible to set a virtualenv to be used by the Python processors in 
Apache MiNiFi C++. If the virtualenv directory is set, the Python processors 
will be executed using the packages installed in the virtualenv. If the 
virtualenv directory is not set, the Python processors will be executed using 
the packages installed on the system.
+
+    # in minifi.properties
+    nifi.python.virtualenv.directory=${MINIFI_HOME}/minifi-python-env
+
+**NOTE:* Using different python versions for the system and the virtualenv is 
not supported. The virtualenv must be created using the same python version as 
the system python.
+
+## Automatically install dependencies from requirements.txt files
+
+It is possible to automatically install the dependencies of the Python 
processors in the virtualenv defined in requirements.txt files. To enable this 
feature, the `nifi.python.install.packages.automatically` property must be set 
to true. If this property is set to true, then all requirements.txt files that 
appear under the MiNiFi Python directory and its subdirectories (defined by the 
`nifi.python.processor.dir` property) will be used to install the Python 
packages. If the `nifi.python.virtualenv.directory` property is set, the 
packages are installed in the virtualenv, otherwise this option is ignored. Due 
to install schema differences in different platforms, system level packages are 
expected to be installed manually by the user.

Review Comment:
   You are right it's more clear this way, updated in 
44654b11b315ed6010424cb72abb334b8b286377



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to