setup.py: install packagescan before any mercurial modules is imported
Further the installation of packagescan over demandload is moved to the
packagescan module.
I added as well few more comments in the packagescan module to avoid
the wrong use of package scan in the future.
Reason:
mercurial.packagescan acts as fake mercurial.demandload during a py2exe
run. Unfortunatly the import of mercurial.version in setup.py is done
before mercurial.packagescan is installed. This results in few imports
without mercurial.packagescan in charge and therefore not all dependend
modules are detected when running mercurial.packagescan.getmodules
later e.g. winerror is missed.
include hg
recursive-include mercurial *.py
include hgweb.cgi hgwebdir.cgi
include hgeditor rewrite-log
include tests/README tests/coverage.py tests/run-tests.py tests/md5sum.py tests/test-*[a-z0-9] tests/*.out
prune tests/*.err
include *.txt
include templates/map templates/map-*[a-z0-9]
include templates/*.tmpl
include templates/static/*
include doc/README doc/Makefile doc/gendoc.py doc/*.txt doc/*.html doc/*.[0-9]
recursive-include contrib *
include README
include CONTRIBUTORS
include COPYING
include Makefile
include MANIFEST.in