Re: [Sugar-devel] Why setup.py?

2009-05-05 Thread Samuel Klein
setup.py has always bugged me for the reasons stated.  SJ

On Tue, Apr 28, 2009 at 1:42 PM, Bert Freudenberg  wrote:
>
> On 28.04.2009, at 17:34, Luke Faraone wrote:
>
> On Tue, Apr 28, 2009 at 11:30, Bert Freudenberg 
> wrote:
>>
>> That would make sense. In fact, I previously made a mkDist.py script
>> (in the etoys repo) that would call the bundle builder to create an xo
>> bundle. It sets the dist_dir variable in the Config object. How would
>> I set the dist_dir when using setup.py?
>
> The *exact* same way you'd do it in your other script. setup.py is just a
> well-known name for the file that "sets up" a package; it's the equivalent
> of a Makefile from the C++ world.
>
> Err, if I change the semantics of setup.py that would break it for other
> users. I would have to pass it as a command line option, but that apparently
> is not supported.
> - Bert -
>
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-05-05 Thread Bert Freudenberg


On 28.04.2009, at 19:42, Bert Freudenberg wrote:



On 28.04.2009, at 17:34, Luke Faraone wrote:

On Tue, Apr 28, 2009 at 11:30, Bert Freudenberg  
 wrote:

That would make sense. In fact, I previously made a mkDist.py script
(in the etoys repo) that would call the bundle builder to create an  
xo

bundle. It sets the dist_dir variable in the Config object. How would
I set the dist_dir when using setup.py?

The *exact* same way you'd do it in your other script. setup.py is  
just a well-known name for the file that "sets up" a package; it's  
the equivalent of a Makefile from the C++ world.



Err, if I change the semantics of setup.py that would break it for  
other users. I would have to pass it as a command line option, but  
that apparently is not supported.


- Bert -



*bump*

- Bert -


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Bert Freudenberg


On 28.04.2009, at 17:34, Luke Faraone wrote:

On Tue, Apr 28, 2009 at 11:30, Bert Freudenberg  
 wrote:

That would make sense. In fact, I previously made a mkDist.py script
(in the etoys repo) that would call the bundle builder to create an xo
bundle. It sets the dist_dir variable in the Config object. How would
I set the dist_dir when using setup.py?

The *exact* same way you'd do it in your other script. setup.py is  
just a well-known name for the file that "sets up" a package; it's  
the equivalent of a Makefile from the C++ world.



Err, if I change the semantics of setup.py that would break it for  
other users. I would have to pass it as a command line option, but  
that apparently is not supported.


- Bert -


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Luke Faraone
On Tue, Apr 28, 2009 at 11:30, Bert Freudenberg wrote:

>  That would make sense. In fact, I previously made a mkDist.py script
> (in the etoys repo) that would call the bundle builder to create an xo
> bundle. It sets the dist_dir variable in the Config object. How would
> I set the dist_dir when using setup.py?


The *exact* same way you'd do it in your other script. setup.py is just a
well-known name for the file that "sets up" a package; it's the equivalent
of a Makefile from the C++ world.

-- 
Luke Faraone
http://luke.faraone.cc
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Bert Freudenberg

On 28.04.2009, at 16:36, Tomeu Vizoso wrote:

> On Tue, Apr 28, 2009 at 16:30, Bert Freudenberg  
>  wrote:
>>
>> On 28.04.2009, at 16:22, Tomeu Vizoso wrote:
>>
>>> On Tue, Apr 28, 2009 at 16:16, Bert Freudenberg
>>>  wrote:

 On 28.04.2009, at 15:49, Aleksey Lim wrote:

> On Tue, Apr 28, 2009 at 03:43:37PM +0200, Bert Freudenberg wrote:
>> On 28.04.2009, at 15:33, SugarLabs Bugs wrote:
>>
>>> #795: Lack of setup.py in Etoys-101.tar.gz
>>> Ticket URL: 
>>
>>
>> So the "fix" is to include this three-line script:
>>
>> #!/usr/bin/python
>> from sugar.activity import bundlebuilder
>> bundlebuilder.start()
>>
>> That does not make sense to me. Why should each and every  
>> activity
>> bundle include the same script?
>
> In that case user(not only packager) has a standard way to bundle
> installed activity(by command "./setup.py dist_xo") despite of the
> nature
> of this activity.
>
> Packager can have standard way to install it by command
> "./setup.py install" as well


 To install an activity, unzip it in the right location. Same for  
 the
 tarball - simply extract it, done.

 Activities were specifically designed to not require installation.
 Unzipping the .xo is all that is needed.

 If this design changed, someone failed to notify activity authors  
 and
 to update the documentation. If so, please specify how setup.py is
 going to get invoked, and what it is supposed to do.
>>>
>>> I don't think it's a requirement of Sugar, but a convenience for
>>> packagers.
>>
>>
>> But if it is the same for every activity, why can't it ship with  
>> Sugar
>> then? Why does each activity have to include it?
>
> Because the idea is that activity authors extend it for their own  
> needs.

Okay. I'll add it then.

>> And if you insist that an activity should provide a setup.py file,
>> where is the spec? How can I verify it's working and covering all
>> cases? What does it do?
>
> The spec is waiting someone to write it ;)
>
> setup.py exists because it addresses a real need, not to say it's the
> best solution, but works.

Maybe. What does it do? Here is its non-helpful help message:

===
[b...@fedora10 Etoys.activity]$ ./setup.py --help
Usage: [action] [options]

Options:
   -h, --help  show this help message and exit
===

>> And what will happen if someone invokes it from the etoys git repo,
>> which includes many more files than go into the activity bundle?
>
> TBH, I don't know much about setup.py, but I think you specify in
> MANIFEST which files you want to go into the bundle.


That would make sense. In fact, I previously made a mkDist.py script  
(in the etoys repo) that would call the bundle builder to create an xo  
bundle. It sets the dist_dir variable in the Config object. How would  
I set the dist_dir when using setup.py?

- Bert -

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Tomeu Vizoso
On Tue, Apr 28, 2009 at 16:30, Bert Freudenberg  wrote:
>
> On 28.04.2009, at 16:22, Tomeu Vizoso wrote:
>
>> On Tue, Apr 28, 2009 at 16:16, Bert Freudenberg
>>  wrote:
>>>
>>> On 28.04.2009, at 15:49, Aleksey Lim wrote:
>>>
 On Tue, Apr 28, 2009 at 03:43:37PM +0200, Bert Freudenberg wrote:
> On 28.04.2009, at 15:33, SugarLabs Bugs wrote:
>
>> #795: Lack of setup.py in Etoys-101.tar.gz
>> Ticket URL: 
>
>
> So the "fix" is to include this three-line script:
>
> #!/usr/bin/python
> from sugar.activity import bundlebuilder
> bundlebuilder.start()
>
> That does not make sense to me. Why should each and every activity
> bundle include the same script?

 In that case user(not only packager) has a standard way to bundle
 installed activity(by command "./setup.py dist_xo") despite of the
 nature
 of this activity.

 Packager can have standard way to install it by command
 "./setup.py install" as well
>>>
>>>
>>> To install an activity, unzip it in the right location. Same for the
>>> tarball - simply extract it, done.
>>>
>>> Activities were specifically designed to not require installation.
>>> Unzipping the .xo is all that is needed.
>>>
>>> If this design changed, someone failed to notify activity authors and
>>> to update the documentation. If so, please specify how setup.py is
>>> going to get invoked, and what it is supposed to do.
>>
>> I don't think it's a requirement of Sugar, but a convenience for
>> packagers.
>
>
> But if it is the same for every activity, why can't it ship with Sugar
> then? Why does each activity have to include it?

Because the idea is that activity authors extend it for their own needs.

> And if you insist that an activity should provide a setup.py file,
> where is the spec? How can I verify it's working and covering all
> cases? What does it do?

The spec is waiting someone to write it ;)

setup.py exists because it addresses a real need, not to say it's the
best solution, but works.

> And what will happen if someone invokes it from the etoys git repo,
> which includes many more files than go into the activity bundle?

TBH, I don't know much about setup.py, but I think you specify in
MANIFEST which files you want to go into the bundle.

Regards,

Tomeu
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Bert Freudenberg

On 28.04.2009, at 16:22, Tomeu Vizoso wrote:

> On Tue, Apr 28, 2009 at 16:16, Bert Freudenberg  
>  wrote:
>>
>> On 28.04.2009, at 15:49, Aleksey Lim wrote:
>>
>>> On Tue, Apr 28, 2009 at 03:43:37PM +0200, Bert Freudenberg wrote:
 On 28.04.2009, at 15:33, SugarLabs Bugs wrote:

> #795: Lack of setup.py in Etoys-101.tar.gz
> Ticket URL: 


 So the "fix" is to include this three-line script:

 #!/usr/bin/python
 from sugar.activity import bundlebuilder
 bundlebuilder.start()

 That does not make sense to me. Why should each and every activity
 bundle include the same script?
>>>
>>> In that case user(not only packager) has a standard way to bundle
>>> installed activity(by command "./setup.py dist_xo") despite of the
>>> nature
>>> of this activity.
>>>
>>> Packager can have standard way to install it by command
>>> "./setup.py install" as well
>>
>>
>> To install an activity, unzip it in the right location. Same for the
>> tarball - simply extract it, done.
>>
>> Activities were specifically designed to not require installation.
>> Unzipping the .xo is all that is needed.
>>
>> If this design changed, someone failed to notify activity authors and
>> to update the documentation. If so, please specify how setup.py is
>> going to get invoked, and what it is supposed to do.
>
> I don't think it's a requirement of Sugar, but a convenience for  
> packagers.


But if it is the same for every activity, why can't it ship with Sugar  
then? Why does each activity have to include it?

And if you insist that an activity should provide a setup.py file,  
where is the spec? How can I verify it's working and covering all  
cases? What does it do?

And what will happen if someone invokes it from the etoys git repo,  
which includes many more files than go into the activity bundle?

- Bert -

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Tomeu Vizoso
On Tue, Apr 28, 2009 at 16:16, Bert Freudenberg  wrote:
>
> On 28.04.2009, at 15:49, Aleksey Lim wrote:
>
>> On Tue, Apr 28, 2009 at 03:43:37PM +0200, Bert Freudenberg wrote:
>>> On 28.04.2009, at 15:33, SugarLabs Bugs wrote:
>>>
 #795: Lack of setup.py in Etoys-101.tar.gz
 Ticket URL: 
>>>
>>>
>>> So the "fix" is to include this three-line script:
>>>
>>> #!/usr/bin/python
>>> from sugar.activity import bundlebuilder
>>> bundlebuilder.start()
>>>
>>> That does not make sense to me. Why should each and every activity
>>> bundle include the same script?
>>
>> In that case user(not only packager) has a standard way to bundle
>> installed activity(by command "./setup.py dist_xo") despite of the
>> nature
>> of this activity.
>>
>> Packager can have standard way to install it by command
>> "./setup.py install" as well
>
>
> To install an activity, unzip it in the right location. Same for the
> tarball - simply extract it, done.
>
> Activities were specifically designed to not require installation.
> Unzipping the .xo is all that is needed.
>
> If this design changed, someone failed to notify activity authors and
> to update the documentation. If so, please specify how setup.py is
> going to get invoked, and what it is supposed to do.

I don't think it's a requirement of Sugar, but a convenience for packagers.

Regards,

Tomeu
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Bert Freudenberg

On 28.04.2009, at 15:49, Aleksey Lim wrote:

> On Tue, Apr 28, 2009 at 03:43:37PM +0200, Bert Freudenberg wrote:
>> On 28.04.2009, at 15:33, SugarLabs Bugs wrote:
>>
>>> #795: Lack of setup.py in Etoys-101.tar.gz
>>> Ticket URL: 
>>
>>
>> So the "fix" is to include this three-line script:
>>
>> #!/usr/bin/python
>> from sugar.activity import bundlebuilder
>> bundlebuilder.start()
>>
>> That does not make sense to me. Why should each and every activity
>> bundle include the same script?
>
> In that case user(not only packager) has a standard way to bundle
> installed activity(by command "./setup.py dist_xo") despite of the  
> nature
> of this activity.
>
> Packager can have standard way to install it by command
> "./setup.py install" as well


To install an activity, unzip it in the right location. Same for the  
tarball - simply extract it, done.

Activities were specifically designed to not require installation.  
Unzipping the .xo is all that is needed.

If this design changed, someone failed to notify activity authors and  
to update the documentation. If so, please specify how setup.py is  
going to get invoked, and what it is supposed to do.

- Bert -


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Why setup.py?

2009-04-28 Thread Aleksey Lim
On Tue, Apr 28, 2009 at 03:43:37PM +0200, Bert Freudenberg wrote:
> On 28.04.2009, at 15:33, SugarLabs Bugs wrote:
>
>> #795: Lack of setup.py in Etoys-101.tar.gz
>> Ticket URL: 
>
>
> So the "fix" is to include this three-line script:
>
> #!/usr/bin/python
> from sugar.activity import bundlebuilder
> bundlebuilder.start()
>
> That does not make sense to me. Why should each and every activity  
> bundle include the same script?

In that case user(not only packager) has a standard way to bundle
installed activity(by command "./setup.py dist_xo") despite of the nature
of this activity.

Packager can have standard way to install it by command
"./setup.py install" as well

-- 
Aleksey
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel