pki-bot / pki-issues-final

0 stars 0 forks source link

Use setup tools to install python files #2724

Open pki-bot opened 3 years ago

pki-bot commented 3 years ago

This issue was migrated from Pagure Issue #3175. Originally filed by dmoluguw (@SilleBille) on 2020-05-20 20:30:47:


Currently, we copy python files to required directories with following Cmake script:

# install Python libraries
install(
    DIRECTORY
        python/pki/server
    DESTINATION
        ${PYTHON3_SITE_PACKAGES}/pki
    FILES_MATCHING PATTERN
        *.py
)

pki.server pki

This makes it difficult to ship the python-based PKI tool on py-pi repo and is impossible to run pytests. Following are the different setup.py files available in upstream:

$ find . -name 'setup.py'
./tests/dogtag/pytest-ansible/setup.py
./tests/dogtag/shared/python/setup.py
./setup.py
./base/common/python/setup.py
./base/server/healthcheck/setup.py

To make the maintenance easier and to ship uniform version on both Fedora and PyPi, Cmake scripts should be configured to use Python setup tools.

Advantages:

pki-bot commented 3 years ago

Comment from dmoluguw (@SilleBille) at 2020-05-20 20:31:12

Metadata Update from @SilleBille: