* EPH cancels IPO plans in favour of direct sale
* Sources say company talking to Macquarie
* Talks could wrap up within weeks
* IPO prep valued EPIF unit in billions of euros (Releads with Macquarie close to buying EPIF)
By Jan Lopatka and Arno Schuetze
PRAGUE/FRANKFURT, April 27 (Reuters) - Czech energy company EPH is close to selling a stake in EP Infrastructure (EPIF) to the infrastructure arm of Australia's Macquarie after scrapping plans to float the gas shipping and heating business, sources familiar with the talks said.
Three sources confirmed talks between the two sides, with one saying EPH was selling a 30 percent stake after Macquarie offered a better price than EPH would achieved in an initial public offering that could have raised some 1.6 billion euros ($1.8 billion) for EPIF's owners.
EPH created EPIF by carving out its steadiest businesses that have long-term contracts and stable revenue and profits. These were likely to grab the attention of infrastructure funds like Macquarie as investors hunt for yield.
The sources told Reuters that a sale agreement could be finalised in the coming weeks.
Macquarie declined to comment.
Analysts had valued EPIF at between less than 5 billion euros to more than 7 billion euros ahead of the IPO.
Some industry insiders have said the company could prefer to remain a closely and flexibly managed business through a sale to a single investor, if it received a strong enough offer, over becoming publicly traded firm listed in Prague and London.
EPH has grown via acquisitions in recent years into one of central Europe's largest power companies. It agreed this month to buy loss-making German lignite coal mines and associated power plants from state-owned Swedish utility Vattenfall VATN.UL . Macquarie had also been in the bidding.
EPH initially announced the plans to hive off its infrastructure businesses, steadier than power generation which suffers from power price swings, in late 2015.
EPIF mainly houses EPH's Slovak and Czech assets in gas transmission, gas and power distribution, heating distribution and gas storage.
The main profit driver is a 49 percent stake in Slovak gas pipeline operator Eustream, which delivers Russian natural gas via Ukraine to the European Union and European gas to Ukraine.
Eustream has a ship or pay contract until 2028 but the pipeline's future utilisation is unclear due to Russia's plans to expand the Nord Stream pipeline and give preference to that over shipments through Ukraine.
EPIF made a net profit of 622.7 million euros last year, of which 288 million is attributable to shareholders, on sales of 3.3 billion euros. Total assets reached 9.7 billion.
Sale proceeds from EPIF would go to EPH, which would use the money to buy back EPH shares from Biques Limited, a passive investor. EPH is two-thirds controlled by Chairman Daniel Kretinsky and investor Patrik Tkac. ($1 = 0.8839 euros)