Ah, yes, tox. I have that installed globally. So, this was successful: $ git clone [email protected]:divio/djangocms-style.git $ cd djangocms-style $ tox -e py27-latest # ... py27-latest: commands succeeded congratulations :)
$ source .tox/py27-latest/bin/activate (py27-latest)$ coverage run setup.py test && coverage report # ... --------------------------------------------------------------------------------------------------------- TOTAL 157 51 56 2 54% (py27-latest)$ python tests/settings.py server # ... Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C Here's another thing that worked (using `virtualenvwrapper`, but `virtualenv` would work, too): $ git clone [email protected]:divio/djangocms-style.git $ mkproject -f djangocms-style (djangocms-style)$ pip install -e . (djangocms-style)$ pip install -r tests/requirements.txt (djangocms-style)$ coverage run setup.py test && coverage report # ... --------------------------------------------------------------------------------------------------------- TOTAL 157 51 56 2 54% (djangocms-style)$ python tests/settings.py server # ... Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C So, in the first version, I'm using re-using the `tox` virtualenv. In the second, I'm creating my own. The `pip install -e .` was what I was missing to work in "development mode" <https://packaging.python.org/distributing/#working-in-development-mode> (i.e., with django-cms installed). Does one of these more closely reflect how the current contributors do plugin development? Do you have any other recommendations? Any thoughts on how should this be documented? On Thursday, November 17, 2016 at 10:39:32 AM UTC-5, Brian Rutledge wrote: > > In the process of submitting a PR for djangocms-style > <https://github.com/divio/djangocms-style/pull/33>, I ran into some snags > with getting my development environment set up. I started by following the > instructions under Running Tests > <https://github.com/divio/djangocms-style#running-tests>, but running > `python setup.py test` resulted in the following error: > > pkg_resources.VersionConflict: (Django 1.10.3 > (/Users/brian/.virtualenvs/djangocms-style/lib/python2.7/site-packages), > Requirement.parse('django<1.10,>=1.8')) > > > It looks like djangocms-helper from tests/requirements.txt > <https://github.com/divio/djangocms-style/blob/master/tests/requirements.txt> > doesn't specify a Django version in its setup.py > <https://github.com/nephila/djangocms-helper/blob/develop/setup.py>, so > the latest is installed, but that conflicts with the django CMS > requirement. So, I did a manual install of Django 1.9.11, and then `python > setup.py test` passed, which was sufficient for the work that I was doing. > > However, it looks to me like more involved work would require using > `djangocms_helper` to make migrations, etc. But, running `djangocms-helper > djangocms_style test --cms` in a fresh virtualenv after `pip install -r > tests/requirements.txt` gives me this error: > > ImportError: No module named djangocms_admin_style > > > The How to use docs > <https://djangocms-helper.readthedocs.io/en/develop/introduction.html> > indicate > that django CMS needs to be installed, but I don't know the "right way" to > do that for plugin development. It's worth noting that I haven't really > worked on pip-installable projects before, so I'm not familiar with how to > use `setup.py` during development. > > So, I'd like to understand how django CMS contributors work on plugins. > Once I understand the process, I'm happy to improve the docs, if needed. > -- Message URL: https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id Unsubscribe: send a message to [email protected] --- You received this message because you are subscribed to the Google Groups "django CMS developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/django-cms-developers/1b4d0ebf-cb29-4bc2-9ffc-39d888a384f9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
