Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#383 closed defect (fixed)

slave-only setup.py generates unusable packages

Reported by: silk <silk@…> Owned by: osimons
Priority: major Milestone: 0.6
Component: Build slave Version: dev
Keywords: Cc: dfraser
Operating System: Linux

Description (last modified by osimons)

Two errors:

  1. __init__.py contains: __import__('pkg_resources').get_distribution('Bitten').version so a full bitten still has to be installed.
  2. egg-info is missing entry points for recipe_commands

Attachments (7)

t383-slave_setup-r663.diff (4.8 KB) - added by osimons 15 years ago.
Fix for slave-only install and running builds.
t383-slave_setup2-r663.diff (5.3 KB) - added by osimons 15 years ago.
Updated patch that also adds documentation for the slave-only install.
t383-slave_setup3-r665.diff (11.3 KB) - added by osimons 15 years ago.
Actually include all needed files to execute builds, and hide setup() call behind if __name__ == "__main__".
t383-slave_setup4-r665.diff (11.2 KB) - added by osimons 15 years ago.
Slightly more rational - sharing some setup() arguments to avoid duplication.
t383-setup_using_feature-r756.diff (9.8 KB) - added by osimons 15 years ago.
Fresh attempt at solving Bitten vs Bitten-Slave building and distribution.
t383-setup_using_feature2-r756.diff (10.3 KB) - added by osimons 15 years ago.
Changing slave name to BittenSlave + some minor manifest tweaks.
t383-setup_using_feature2-r756-disable_master_in_slave_sdist.patch (694 bytes) - added by dfraser 15 years ago.
A longwinded name - this goes on top of osimon's last patch and prevents slave sdist from having --with-matser

Download all attachments as: .zip

Change History (15)

comment:1 Changed 15 years ago by dfraser

  • Owner changed from cmlenz to dfraser
  • Status changed from new to assigned

My bad. Need to think how to handle this...

comment:2 Changed 15 years ago by osimons

  • Description modified (diff)

(Description formatting)

Changed 15 years ago by osimons

Fix for slave-only install and running builds.

comment:3 Changed 15 years ago by osimons

  • Cc dfraser added
  • Owner changed from dfraser to osimons
  • Status changed from assigned to new

Please try attachment:t383-slave_setup-r663.diff - I think it solves both reported issues, and at least my simple 'echo' dummy builds run without issues through a slave-only install.

Changed 15 years ago by osimons

Updated patch that also adds documentation for the slave-only install.

Changed 15 years ago by osimons

Actually include all needed files to execute builds, and hide setup() call behind if __name__ == "__main__".

comment:4 Changed 15 years ago by osimons

Seems I was a bit tricked by my many test-installs and pre-existing build directory - python setup.py clean --all was needed before running the slave-only install to only get the trimmed fileset included in the install. That showed that none of the build commands were actually included so no builds would execute. All should be there now.

I've also hidden the main setup.setup() call behind a if __name__ == '__main__' conditional to avoid master setup running when recipe_commands are imported. I don't really know if that is supported, but as far as I can tell from my testing with both python setup.py and easy_install it seems to work fine. Anyone know differently?

Finally, I've also removed tests from the slave-only setup as this was not working (exception). I don't see the point in having a test infrastructure for what is actually a single test - a test that is included in main tests anyway.

Changed 15 years ago by osimons

Slightly more rational - sharing some setup() arguments to avoid duplication.

comment:5 Changed 15 years ago by osimons

  • Milestone set to 0.6
  • Resolution set to fixed
  • Status changed from new to closed

Committed in [672].

comment:6 Changed 15 years ago by osimons

  • Resolution fixed deleted
  • Status changed from closed to reopened

The separate setup scripts don't work so well when we get to distribution - the slave egg will still try to install from the main setup.py.

I've prepared a patch that does this differently, and that also fixes some issues with our beta1 generation of distributions (missing data+++). Starting point at least.

It uses the setuptools.Feature and merges the 2 setup files into one. Basically it enables 'master' by default, but it can be disabled for slave-only build/dist using --witout-master.

There may be some corner-cases I haven't tested, but from my testing this works:

  • ./setup.py sdist -> a full sdist
  • ./setup.py --without-master sdist -> slave-only, and executable source only
  • ./setup.py --without-master test -> runs slave-only tests

I've added testing for existence of MANIFEST.in that was needed so that if for instance a --without-master bdist_egg is run, doing easy_install on this egg later will keep the 'Bitten-Slave' package name and data and not try to re-enable the 'Bitten' information.

Patch follows.

Changed 15 years ago by osimons

Fresh attempt at solving Bitten vs Bitten-Slave building and distribution.

Changed 15 years ago by osimons

Changing slave name to BittenSlave + some minor manifest tweaks.

comment:7 Changed 15 years ago by cmlenz

Looks good to me!

Changed 15 years ago by dfraser

A longwinded name - this goes on top of osimon's last patch and prevents slave sdist from having --with-matser

comment:8 Changed 15 years ago by osimons

  • Resolution set to fixed
  • Status changed from reopened to closed

The rework is committed in [758], and will be merged to 0.6 branch shortly.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.