We present a density functional approach to orientational ordering in homopolymeric systems. The polymers are modeled as chains of identical rodlike segments connected via a simple generic bending potential. The segments are impenetrable to each other, and it is their mutual excluded volume that drives the transition from the orientationally disordered isotropic phase to the orientationally ordered nematic fluid. These excluded volume effects are accounted for within the so-called Onsager approximation at the chain-chain level and in an independent pairwise overlap approximation at the segment-segment level. The Khokhlov and Semenov formalism for nematic wormlike polymers is shown to be an exact limiting case of our treatment. The ordering transition is studied analytically by using a linear stability analysis of the isotropic phase yielding the properties of the system at the isotropic-nematic (I--N) bifurcation point. Using a numerical scheme, the equilibrium distribution functions in the nematic phase are calculated, and the location of the thermodynamic I--N transition is determined. For stiff bending potentials, chains with a relatively small number of segments are found to behave like wormlike chains, and we determine the regime of model parameters for which this identification holds.