build-wheel.py is part of the main indico repo, You can find it in bin/maintenance/. In the end it’s just python setup.py bdist_wheel on steroids (it also builds i18n dictionaries if there are any, ensures the source tree is clean before building, etc.)
Once you built your plugin, copy the *.whl file to the machine where you want to install the plugin and use pip install whatever.whl to actually install it (make sure your Python virtualenv is active).
Note: During initial development/testing you do not need to build a wheel. Simply use pip install -e . to install it in your development environment - like this any changes you make to the files will be used immediately without having to rebuild/reinstall all the time.
You are mixing up things… pip install -e . is something you run in your source directory, NOT inside the virtualenv (you really never need to cd in there)
In case your source is actually in /opt/indico/.venv/lib/python2.7/payment_lupayments/, then move it somewhere else, e.g. ~/dev/indico_payment_lupayments.
The “permission denied” error seems strange. Did you accidentally create the virtualenv as root?
I’m not the admin, just the dev. And yes, it was created with root.
It got fixed and I managed to install my plugin on the development system. No idea how I will set up it on prod since I don’t have the maintenance directory with build-wheel.py in it, but that will be for a bit later.
The idea is to build the wheel on your development system and only copy the *.whl file to production and then pip install whatever.whl there. The script is part of the Indico repo but not part of the indico python package, since it’s not supposed to be used on a production machine.
Another short question: does the paypal plugin actually set a status if the payman was succesfull or not?
If I understand it correctly, after a success the provided return_url is opened and this method is called (name is remade for my plugin of course):
class RHLUPaymentsSuccess(RHLUPaymentsIPN):
"""Confirmation message after successful payment"""
def _process(self):
flash(_('Your payment request has been processed.'), 'success')
return redirect(url_for('event_registration.display_regform', self.registration.locator.registrant))
What this does is - it adds a message about the payment and opens the registration form again. But it does not save the status of the payment as successful. Thus, I end up in the same registration screen with the message, that the payment was successful, but the status of the registration is still Not paid.
Did I miss something or is this intended behavior?
Right, so if you are testing it make sure that the machine running Indico is accessible from the public internet and is using a proper SSL certificate (LetsEncrypt is OK, self-signed isn’t).
I think paypal is supposed to send the request before redirecting you back, but I guess it can take longer in some cases (for sure if the payment is not accepted automatically but pending manual verification from the recipient).