command hooks...

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

command hooks...

Rob Healey
Greetings All:

I would like to know if anyone could help me with this problem?

Here is where you can find the files that are involved in this issue:
1) http://dl.dropbox.com/u/47247655/setup.cfg
2) http://dl.dropbox.com/u/47247655/setup_custom.py

These files are held in the public folder of my DropBox account...
Any help that you can give to me would be greatly appreciated!

BTW, these two files are within the same directory within the same project!

Here is the error that I get:

[root@SwimmingAntelope gep-026]# pysetup run install_dist
running install_dist
setup_custom
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 651, in main
    return dispatcher()
  File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 639,
in __call__
    return func(self, self.args)
  File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 91, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 285, in _run
    dist.run_command(cmd, dispatcher.command_options[cmd])
  File "/usr/lib/python2.7/site-packages/distutils2/dist.py", line
709, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/distutils2/command/install_dist.py",
line 509, in run
    self.run_command('build')
  File "/usr/lib/python2.7/site-packages/distutils2/command/cmd.py",
line 330, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/site-packages/distutils2/dist.py", line
707, in run_command
    self.run_command_hooks(cmd_obj, 'pre_hook')
  File "/usr/lib/python2.7/site-packages/distutils2/dist.py", line
732, in run_command_hooks
    raise PackagingModuleError(e)
PackagingModuleError: setup_custom


--
Sincerely yours,
Rob G. Healey
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Éric Araujo
Good evening,

> BTW, these two files are within the same directory within the same project!
> Here is the error that I get:
> [...]
> PackagingModuleError: setup_custom

This looks like http://bugs.python.org/issue11637
The project directory needs to be added to sys.path when running command
hooks.  I have a patch in progress and will commit it when I get some
spare round tuits.

Thank you for testing and sending feedback!

Regards
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Rob Healey
Dear Eric:

Is Distutils2 kind of your baby?  Simply, you are the only one working
on it!  I am curious as to what you mean by this statement, when I get
some spare round tuits?

From the bug tracker page, this has been around for over a year!  I
applied the diff file that was attached to the page to the current
Python-3.3.0a2, and it doesn't make a bit of difference on the
outcome...

I also added the path to sys.path, like this:
sys.path.append(os.getcwd()) and it doesn't make a difference!

After the upcoming Distutils2 sprint, when will the work be patched
into Distutils2?  When will we see the benefit of all the work that
will be done???

1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py
2) http://dl.dropbox.com/u/47247655/setup_custom.py
3) http://dl.dropbox.com/u/47247655/setup.cfg

1) Will create the setup.cfg file if one is not there...?

The rest, you know about already...  I have updated 2 and 3 and
uploaded the new ones...

Sincerely yours,
Rob G. Healey



On Fri, Apr 20, 2012 at 5:32 PM, Éric Araujo <[hidden email]> wrote:

> Good evening,
>
>> BTW, these two files are within the same directory within the same project!
>> Here is the error that I get:
>> [...]
>> PackagingModuleError: setup_custom
>
> This looks like http://bugs.python.org/issue11637
> The project directory needs to be added to sys.path when running command
> hooks.  I have a patch in progress and will commit it when I get some
> spare round tuits.
>
> Thank you for testing and sending feedback!
>
> Regards
> _______________________________________________
> Distutils-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/distutils-sig



--
Sincerely yours,
Rob G. Healey
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Éric Araujo
Hi again,

> Is Distutils2 kind of your baby?  Simply, you are the only one working
> on it!
It’s more like my foster kid.  At first there was distutils, in the
standard library since 1999.  After a few years it stopped being
actively developed, and people started to rely on undocumented behavior
and internal things.  Four years ago Tarek Ziadé became the new
maintainer for distutils and attacked the big pile of bugs and feature
requests.  He hit a barrier when his changes broke other people’s code,
so it was decided two years ago to stop adding new features or clean up
code in distutils and instead start anew in a project named distutils2,
where backward compatibility would not stall all improvement efforts.
That’s when I started contributing, as a Google Summer of Code student
and then a volunteer.  Tarek focused on distutils2 and passed on the
maintenance of distutils to me, and later I also became the maintainer
of distutils2, i.e. I reply to most bugs and make the releases.  Tarek
is still the lead of the project and weighs in for important changes.

> I am curious as to what you mean by this statement, when I get
> some spare round tuits?
That’s a wordplay from the expression “I’ll get around to it” → “I’ll
get a round tuit”.

> From the bug tracker page, this has been around for over a year!
Bugs live from a few minutes to a few years; with more than 300 bugs on
my list, I can’t get to everything at the same time.  For the last
months I’ve also been busy with paperwork and a new job.  But be sure
the bug is not forgotten; it’s one of the things that will be fixed
before distutils2 1.0 and Python 3.3.0.

> I applied the diff file that was attached to the page to the current
> Python-3.3.0a2, and it doesn't make a bit of difference on the
> outcome...
If you read the full bug report you’ll see that this patch was already
applied and only fixes setup hooks; I said that I was working on a patch
for commands hooks but I did not upload it as it was not finished.

> I also added the path to sys.path, like this:
> sys.path.append(os.getcwd()) and it doesn't make a difference!
Probably because you did that in your code, but that makes no difference
because it happens after pysetup is started and tries to import your
module.  I don’t know if I’ll have time to fix this bug tomorrow, as
I’ll have mentoring to do, so no promises here.

> After the upcoming Distutils2 sprint, when will the work be patched
> into Distutils2?  When will we see the benefit of all the work that
> will be done???
The changes from the sprint will go into the main repository
immediately, and after a short while they will get ported into packaging
in the cpython repository.  I want to release distutils2 1.0a5 soon
after the sprint.

> 1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py
> [...]
> 1) Will create the setup.cfg file if one is not there...?
As you’re using open('setup.cfg', 'w'), the file will be recreated each
time you run the script.  I’m not sure you need that script; why not
just create the config file once and keep it updated when you have changes?

Regards
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Rob Healey
Dear Eric:

On Fri, Apr 20, 2012 at 10:51 PM, Éric Araujo <[hidden email]> wrote:
> Hi again,
>
>> Is Distutils2 kind of your baby?  Simply, you are the only one working on it!

> It’s more like my foster kid.  At first there was distutils, in the
> standard library since 1999.  After a few years it stopped being actively developed, and people started to rely on undocumented behavior and internal things.  Four years ago Tarek Ziadé became the new maintainer for distutils and attacked the big pile of bugs and feature requests.  He hit a barrier when his changes broke other people’s code,  so it was decided two years ago to stop adding new features or clean up code in distutils and instead start anew in a project named distutils2, where backward compatibility would not stall all improvement efforts.  That’s when I started contributing, as a Google Summer of Code student
> and then a volunteer.  Tarek focused on distutils2 and passed on the maintenance of distutils to me, and later I also became the maintainer of distutils2, i.e. I reply to most bugs and make the releases.  Tarek is still the lead of the project and weighs in for important changes.

I understand now!  My role at gramps is something like that too in one
manner of updating the two plugins in the webreport directory,
NarrativeWeb.py and WebCal.py...

I am full owner and maintainer of my plugin, EditExifImageMetadata.py,
which allows editing and creation of metadata fields for images...
Now anyone else can also modify this plugin and also the plugins
listed above, but it mainly falls on my shoulders...

>
>> I am curious as to what you mean by this statement, when I get some spare round tuits?

> That’s a wordplay from the expression “I’ll get around to it” → “I’ll get a round tuit”.

I like it...

>
>> From the bug tracker page, this has been around for over a year!  Bugs live from a few minutes to a few years; with more than 300 bugs on my list, I can’t get to everything at the same time.  For the last months I’ve also been busy with paperwork and a new job.  But be sure the bug is not forgotten; it’s one of the things that will be fixed before distutils2 1.0 and Python 3.3.0.

After the sprint and you release Distutils2-1.0a5, would you also
update the version_info too?  If you import distutils2, and then
distutils2.version_info, you get a3 not a4?
>
>> I applied the diff file that was attached to the page to the current Python-3.3.0a2, and it doesn't make a bit of difference on the outcome...

Obviously, I didn't get that far in reading the bug tracker!  I will
re-download Python-3.3.0a2 and re-install it without the extra diff
file...


> If you read the full bug report you’ll see that this patch was already applied and only fixes setup hooks; I said that I was working on a patch for commands hooks but I did not upload it as it was not finished.

I am more than willing to do testing of the patch for you if you would
like?  Is there a way for me to get svn or git access to the
developmental version of Distutils2?

Since I am legally blind and have kidney failure, I spend a whole lot
of time at home on my computer!  It is also one extra thing that I do
at gramps is alpha and beta testing...

>
>> I also added the path to sys.path, like this:
>> sys.path.append(os.getcwd()) and it doesn't make a difference!

What would I do in Linux to add my directory to the permanent $PYTHONPATH???

> Probably because you did that in your code, but that makes no difference because it happens after pysetup is started and tries to import your module.  I don’t know if I’ll have time to fix this bug tomorrow, as I’ll have mentoring to do, so no promises here.

Is there access to the bug tracker for simply Distutils2 only?  I
would like to see it and start getting familiar with the Distutils2
code???
>
>> After the upcoming Distutils2 sprint, when will the work be patched into Distutils2?  When will we see the benefit of all the work that will be done???

> The changes from the sprint will go into the main repository
> immediately, and after a short while they will get ported into packaging in the cpython repository.  I want to release distutils2 1.0a5 soon after the sprint.

I will certainly be looking forward to it!  Once again, I have a lot
of time on my hands, so I am willing to do alpha/ beta testing...
>
>> 1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py
>> [...]
>> 1) Will create the setup.cfg file if one is not there...?
> As you’re using open('setup.cfg', 'w'), the file will be recreated each time you run the script.  I’m not sure you need that script; why not just create the config file once and keep it updated when you have changes?

You are correct about, why not just update the setup.cfg file instead
of creating one each time I make changes!

Sincerely yours,
Rob G. Healey


>
> Regards
> _______________________________________________
> Distutils-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/distutils-sig



--
Sincerely yours,
Rob G. Healey
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Éric Araujo
Hi,

> After the sprint and you release Distutils2-1.0a5, would you also
> update the version_info too?  If you import distutils2, and then
> distutils2.version_info, you get a3 not a4?
I forgot to update distutils2.__version__ when I cut my first release :)
 Now I will remember it.

> I will re-download Python-3.3.0a2 and re-install it without the
> extra diff file...
Yeah, editing a real installation to test things is fragile.  Better use
a Mercurial clone that is not installed and that lets you revert
changes.  Help is found at http://docs.python.org/devguide .

> I am more than willing to do testing of the patch for you if you would
> like?  Is there a way for me to get svn or git access to the
> developmental version of Distutils2?
hg clone http://hg.python.org/distutils2
I haven’t finished my patch because I ended up fixing too many things at
once: hooks need to add the project directory to sys.path, hooks errors
should result in warnings but not stop all operation, and maybe another
bug.  I need to split that into smaller changes.

Do you have a user account on bugs.python.org?  Now that I know that
you’re willing to test things or give your opinion as a user (thanks!),
if you create an account it will makes it easy to add you to a bug
discussion.

> What would I do in Linux to add my directory to the permanent
> $PYTHONPATH???
Many ways to do that, but it is not a correct solution here.  When you
run pysetup, it should put the project directory in sys.path without the
user having to do anything (and with my patch it does).

> Is there access to the bug tracker for simply Distutils2 only?  I
> would like to see it and start getting familiar with the Distutils2
> code???
The bug tracker has categories, called components, and there is one for
d2: http://is.gd/mFZfqo .  Some of the bugs are tagged “easy” to mean
that they are good introductory bugs for people wanting to work on d2.
I also intend to write more wiki pages or blog posts to explain how the
codebase is laid out and internally works to reduce the bus factor of d2.

Best regards
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Chris McDonough
In reply to this post by Éric Araujo
On 04/21/2012 01:51 AM, Éric Araujo wrote:

> Hi again,
>
>> Is Distutils2 kind of your baby?  Simply, you are the only one working
>> on it!
> It’s more like my foster kid.  At first there was distutils, in the
> standard library since 1999.  After a few years it stopped being
> actively developed, and people started to rely on undocumented behavior
> and internal things.  Four years ago Tarek Ziadé became the new
> maintainer for distutils and attacked the big pile of bugs and feature
> requests.  He hit a barrier when his changes broke other people’s code,
> so it was decided two years ago to stop adding new features or clean up
> code in distutils and instead start anew in a project named distutils2,
> where backward compatibility would not stall all improvement efforts.
> That’s when I started contributing, as a Google Summer of Code student
> and then a volunteer.  Tarek focused on distutils2 and passed on the
> maintenance of distutils to me, and later I also became the maintainer
> of distutils2, i.e. I reply to most bugs and make the releases.  Tarek
> is still the lead of the project and weighs in for important changes.

Georg Brandl was trying to herd cats on outstanding PEPs today:

http://mail.python.org/pipermail/python-dev/2012-May/119157.html

Is there a PEP for the "packaging" package?  Is there any sort of
unfinished business I can help with?

- C


>
>> I am curious as to what you mean by this statement, when I get
>> some spare round tuits?
> That’s a wordplay from the expression “I’ll get around to it” → “I’ll
> get a round tuit”.
>
>>  From the bug tracker page, this has been around for over a year!
> Bugs live from a few minutes to a few years; with more than 300 bugs on
> my list, I can’t get to everything at the same time.  For the last
> months I’ve also been busy with paperwork and a new job.  But be sure
> the bug is not forgotten; it’s one of the things that will be fixed
> before distutils2 1.0 and Python 3.3.0.
>
>> I applied the diff file that was attached to the page to the current
>> Python-3.3.0a2, and it doesn't make a bit of difference on the
>> outcome...
> If you read the full bug report you’ll see that this patch was already
> applied and only fixes setup hooks; I said that I was working on a patch
> for commands hooks but I did not upload it as it was not finished.
>
>> I also added the path to sys.path, like this:
>> sys.path.append(os.getcwd()) and it doesn't make a difference!
> Probably because you did that in your code, but that makes no difference
> because it happens after pysetup is started and tries to import your
> module.  I don’t know if I’ll have time to fix this bug tomorrow, as
> I’ll have mentoring to do, so no promises here.
>
>> After the upcoming Distutils2 sprint, when will the work be patched
>> into Distutils2?  When will we see the benefit of all the work that
>> will be done???
> The changes from the sprint will go into the main repository
> immediately, and after a short while they will get ported into packaging
> in the cpython repository.  I want to release distutils2 1.0a5 soon
> after the sprint.
>
>> 1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py
>> [...]
>> 1) Will create the setup.cfg file if one is not there...?
> As you’re using open('setup.cfg', 'w'), the file will be recreated each
> time you run the script.  I’m not sure you need that script; why not
> just create the config file once and keep it updated when you have changes?
>
> Regards
> _______________________________________________
> Distutils-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/distutils-sig

_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Paul Moore
On 1 May 2012 17:40, Chris McDonough <[hidden email]> wrote:
> Georg Brandl was trying to herd cats on outstanding PEPs today:
>
> http://mail.python.org/pipermail/python-dev/2012-May/119157.html
>
> Is there a PEP for the "packaging" package?  Is there any sort of unfinished
> business I can help with?

AFAIK, there's no specific PEP for packaging (there are a number of
related PEPs, but nothing specific like a roadmap).

I'm sure Éric can give you much better pointers on what would be
useful, but one issue I've tried to raise a few times, and more
recently Jim Fulton raised here
(http://mail.python.org/pipermail/distutils-sig/2012-March/018323.html)
is that of binary distribution support in packaging2. I've never had
the time to shepherd a proposal through beyond the "initial debate"
stage, and I know it's not getting high on Éric's list of priorities,
but it would be good to see some movement on this.

I can offer opinions, Windows testing, and assistance, but I really
don't have the time to make this happen. But I honestly believe that
unless packaging has binary distribution support, it won't get
"critical mass", on Windows if nowhere else.

Just a thought - if it's where your interests lie, that would be great.
Paul.
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: command hooks...

Chris McDonough
On 05/01/2012 02:28 PM, Paul Moore wrote:

> On 1 May 2012 17:40, Chris McDonough<[hidden email]>  wrote:
>> Georg Brandl was trying to herd cats on outstanding PEPs today:
>>
>> http://mail.python.org/pipermail/python-dev/2012-May/119157.html
>>
>> Is there a PEP for the "packaging" package?  Is there any sort of unfinished
>> business I can help with?
>
> AFAIK, there's no specific PEP for packaging (there are a number of
> related PEPs, but nothing specific like a roadmap).
>
> I'm sure Éric can give you much better pointers on what would be
> useful, but one issue I've tried to raise a few times, and more
> recently Jim Fulton raised here
> (http://mail.python.org/pipermail/distutils-sig/2012-March/018323.html)
> is that of binary distribution support in packaging2. I've never had
> the time to shepherd a proposal through beyond the "initial debate"
> stage, and I know it's not getting high on Éric's list of priorities,
> but it would be good to see some movement on this.
>
> I can offer opinions, Windows testing, and assistance, but I really
> don't have the time to make this happen. But I honestly believe that
> unless packaging has binary distribution support, it won't get
> "critical mass", on Windows if nowhere else.

Yeah, it's kinda required.  We currently tell people to avoid pip
because it doesn't support installation of binary distributions.  It's
just too hard to document the corner cases of using both pip and
easy_install at the same time, or telling Windows people to use
easy_install and UNIX people to use pip, or some combination thereof.

I'm not sure if other features we (the Pylons project) make heavy use of
like extras, console scripts, entry points, and testing hooks are
currently supported, but if they aren't I'd be willing to help add them
as necessary.  We wouldn't really be able to use it without this stuff,
in any case.

> Just a thought - if it's where your interests lie, that would be great.
> Paul.

In a perfect world, I'd not be volunteering, but it looks like I have to
if I want to be able to get to bitch. ;-)

- C
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig