0

We are keen to use PyDev for our edX customizatoin and we want to configure edX code on it. Do you know of any documentation which talks about how to configure PyDev for edX code? Basically, I have imported all the projects of edX into PyDev but I am stuck at the point of building the projects as I am not aware of the configurations required to be done and there are lot of dependancies between various projects. Any help would be appreciated. Thanks & Regards, Abhijeet Mote

abhijeetmote
  • 131
  • 1
  • 10

1 Answers1

1

I happen to know where to find the directions for configuring Eclipse.

You can find the details at the attachment of this post.

Edit: Update based on the configuration from the link

  1. Create MITx python environment

    • Go to Windows>Preferences>PyDev>Interpreter - Python (Ubuntu) or Eclipse>Preferences>PyDev>Interpreter - Python (Mac)
    • Set up (or create new) location, pointing to ~/mitx_all/python/bin/python. You may need to spell out the home path. You may get a warning saying that source code is not found.
    • (If necessary, add /usr/bin/python2.7 to list of included paths for interpreter. That might provide some of the missing source code.)
  2. Create MITx project

    • Do File>New>Other, select PyDev/PyDev Django Project
    • Enter "mitx" or similar as the project name and point to mitx_all/mitx location
    • In project properties (right click the project in left panel), set PyDev - PYTHONPATH, Source Folders to:
      • the root dir /mitx
      • /mitx/common/lib/xmodule
      • /mitx/cms
      • /mitx/cms/djangoapps
      • /mitx/lms
      • /mitx/lms/djangoapps
      • /mitx/lms/lib
      • /mitx/common/djangoapps
      • /mitx/common/lib
  3. Create a manage.py file to use that's within the project hierarchy (instead of django_admin.py, which is over in mitx_all/python/bin). For example, put the following in ~/mitx_all/mitx/manage.py:

#!/home/<username>/mitx_all/python/bin/python
from django.core import management
if __name__ == "__main__":
    management.execute_from_command_line()
  1. Open Debug Configurations dialog. (Either right-click on project -> Debug as -> Debug Configurations or menu Run -> Debug Configurations to bring up configuration dialog.)
  2. In dialog, right-click on PyDev Django -> New (New is the icon above the left nav).
  3. On main tab, set name: pick a name to indicate what Django config you're using (e.g. LMS dev with runserver).
  4. Project should be MITx (or whatever you called it)
  5. For main module, browse to location of manage.py created above.
  6. On Arguments tab, put program arguments. For example, to run the LMS, put "runserver --noreload --settings=lms.envs.dev --pythonpath=. 8000".
  7. On Interpreter tab, select the MITx interpreter [which is in the drop down] (the one that uses mitx_all/python). This may be the same as your default interpreter, depending on your global interpreter settings.
  8. In Environment tab, set DJANGO_SETTINGS_MODULE to point to the desired setting file (e.g. lms.envs.dev). If you aren't running with activate and such, then PATH may also need to be set (or augmented)
dazedconfused
  • 1,312
  • 2
  • 19
  • 26