I think optimizing farming for space flight is probably better, especially if you have always-on solar power (as you do anywhere near the sun) or nuclear power. Hydrocarbons from asteroids and comets are probably better suited for things like plastics manufacture and petrochemicals, since you would not have biotic oil sources in space.