Re: setup.py for Django project?

2017-09-11 Thread Scot Hacker
Thanks for the feedback everyone. Good to get some real-world input on 
non-standard approaches like this. I'm going to try and steer the project 
away from it.

And I agree that manage.py and setup.py are not interchangeable at all - 
especially since not everything *goes* through manage.py.

./s

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f33e3f13-4353-48b6-9e9a-b45aa8f82bd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setup.py for Django project?

2017-09-08 Thread Александр Христюхин (roboslone)
`manage.py` is ABSOLUTELY NOT a `setup.py`. It doesn't really matter how you 
think.

`setup.py` is used for package managing while `manage.py` manages Django.

> On 8 Sep 2017, at 09:17, callsamle...@gmail.com wrote:
> 
> hi,
> yes, django has `setup.py`, that's `manage.py`,LOL
> 
> depend on how you think. 
> if you code is like `tools`, that use `setup.py`
> like your code is a `calculator`.
> if not, that's many way to setup, like Fabric, Ansible,etc.
> think this two word, `functional` and  `system/project`
> 
> for python, see PEP-400
> 
> "Projects" are software components that are made available for integration. 
> Projects include Python libraries, frameworks, scripts, plugins, 
> applications, collections of data or other resources, and various 
> combinations thereof. Public Python projects are typically registered on the 
> Python Package Index .
> 
> 
> 
> 
> On Thursday, September 7, 2017 at 4:29:13 AM UTC+8, Scot Hacker wrote:
> I am accustomed to seeing pip-installable dependencies of a Django project 
> each have their own `setup.py`. I am not accustomed to seeing a Django 
> project *itself* have its own `setup.py`, but I am now working with a project 
> that does just that. The setup does not move the Django project itself to 
> `site-packages`, but does add the whole project to the Python path.
> 
> This approach is not documented or recommended by Django itself, and I can't 
> find many references to it on the web. The stated advantages are that it lets 
> you use `manage.py` from any dir (not just the top-level) and that it 
> simplifies the writing of fab commands. I am wary of it because it (slightly) 
> complicates setup, is unusual, confusing to new developers, etc. 
> 
> Does anyone have experience with this approach? In 10 years of Django 
> development, I've never encountered this on a project, and it feels a bit... 
> strange to me. But would love to hear from anyone who has had positive or 
> negative experiences doing this. 
> 
> Thanks for any feedback,
> Scot
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to django-users@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/940b4795-dfd5-44c6-8766-72f2e2471a35%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6884AC13-6E91-441F-837C-1508AEA9B422%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: setup.py for Django project?

2017-09-08 Thread callsamleung
hi,
yes, django has `setup.py`, that's `manage.py`,LOL

depend on how you think. 
if you code is like `tools`, that use `setup.py`
like your code is a `calculator`.
if not, that's many way to setup, like Fabric, Ansible,etc.
think this two word, `functional` and  `system/project`

for python, see PEP-400


"Projects" are software components that are made available for integration. 
Projects include Python libraries, frameworks, scripts, plugins, 
applications, collections of data or other resources, and various 
combinations thereof. Public Python projects are typically registered on 
the Python Package Index .



On Thursday, September 7, 2017 at 4:29:13 AM UTC+8, Scot Hacker wrote:
>
> I am accustomed to seeing pip-installable dependencies of a Django project 
> each have their own `setup.py`. I am not accustomed to seeing a Django 
> project *itself* have its own `setup.py`, but I am now working with a 
> project that does just that. The setup does not move the Django project 
> itself to `site-packages`, but does add the whole project to the Python 
> path.
>
> This approach is not documented or recommended by Django itself, and I 
> can't find many references to it on the web. The stated advantages are that 
> it lets you use `manage.py` from any dir (not just the top-level) and that 
> it simplifies the writing of fab commands. I am wary of it because it 
> (slightly) complicates setup, is unusual, confusing to new developers, etc. 
>
> Does anyone have experience with this approach? In 10 years of Django 
> development, I've never encountered this on a project, and it feels a 
> bit... strange to me. But would love to hear from anyone who has had 
> positive or negative experiences doing this. 
>
> Thanks for any feedback,
> Scot
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/940b4795-dfd5-44c6-8766-72f2e2471a35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setup.py for Django project?

2017-09-07 Thread Ben Lopatin
I've seen this on a few projects before and each time transitioned the 
project away from it.

As you note, for whatever advantages it seems like there may be, it's very 
much atypical and also unnecessary. I don't see how it makes writing Fabric 
tasks significantly easier (presumably you don't need to reference the 
project path? which saves the uses of one variable or something) and you 
can use django-admin.py from anywhere without this, provided your path is 
updated in the environment.

Would be open to someone chiming in about a specific use case in which 
using setup.py to install a Django project is a significant advantage but 
all things being equal I'd not rely on it.

On Wednesday, September 6, 2017 at 4:29:13 PM UTC-4, Scot Hacker wrote:
>
> I am accustomed to seeing pip-installable dependencies of a Django project 
> each have their own `setup.py`. I am not accustomed to seeing a Django 
> project *itself* have its own `setup.py`, but I am now working with a 
> project that does just that. The setup does not move the Django project 
> itself to `site-packages`, but does add the whole project to the Python 
> path.
>
> This approach is not documented or recommended by Django itself, and I 
> can't find many references to it on the web. The stated advantages are that 
> it lets you use `manage.py` from any dir (not just the top-level) and that 
> it simplifies the writing of fab commands. I am wary of it because it 
> (slightly) complicates setup, is unusual, confusing to new developers, etc. 
>
> Does anyone have experience with this approach? In 10 years of Django 
> development, I've never encountered this on a project, and it feels a 
> bit... strange to me. But would love to hear from anyone who has had 
> positive or negative experiences doing this. 
>
> Thanks for any feedback,
> Scot
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/be5760d6-e3cf-469b-8cf2-6c3f1d9d4361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


setup.py for Django project?

2017-09-06 Thread Scot Hacker
I am accustomed to seeing pip-installable dependencies of a Django project 
each have their own `setup.py`. I am not accustomed to seeing a Django 
project *itself* have its own `setup.py`, but I am now working with a 
project that does just that. The setup does not move the Django project 
itself to `site-packages`, but does add the whole project to the Python 
path.

This approach is not documented or recommended by Django itself, and I 
can't find many references to it on the web. The stated advantages are that 
it lets you use `manage.py` from any dir (not just the top-level) and that 
it simplifies the writing of fab commands. I am wary of it because it 
(slightly) complicates setup, is unusual, confusing to new developers, etc. 

Does anyone have experience with this approach? In 10 years of Django 
development, I've never encountered this on a project, and it feels a 
bit... strange to me. But would love to hear from anyone who has had 
positive or negative experiences doing this. 

Thanks for any feedback,
Scot

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/740d00af-0e81-452b-956e-c84fd5ca2e3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.