David Amian <dam...@emergya.com> added the comment: 2011/11/18 Éric Araujo <rep...@bugs.python.org>
> > Éric Araujo <mer...@netwok.org> added the comment: > > > I've a project, in the setup.py file, I've a function called > update_prefix, that updates the > > 'path_project' variable with prefix arguments from setup.py > > If you runs setup.py with --prefix=/usr, then the file in > 'projectname/projectnameconfig.py' is > > modified changing the 'path_project' variable from > > @PREFIX@+"share/projectname" > to > > '/usr/share/projectname'. If you runs setup.py without prefix arguments, > the prefix is '/usr/local'. > > Did you write a custom 'install' class or are you for example looking at > sys.argv to decide whether to run your function? If it’s not implemented > as a distutils command, it’s not surprising that it does not integrate well. > Really I've a function to update prefix based on sys.argv but i changed this using a custom class command and the same issue occurs > > > [...] > > That is cause of the issue, that I explain in the early comment, I fixed > it rounding to two decimals > > instead of rounding to integer. > > Okay. Can you make sure that this is the source of the problem, for > example by adding time.sleep(1) between build and install? > I puts a time.sleep(1) bewteen 'setup.py build' and 'setup.py install' and I got these results: *Without waiting: $debuild -us -uc [...] mkdir -p debian/python-module-stampdir cd . && \ python setup.py build \ --build-base="/tmp/pdal/pdal2-0.3.1/./build" running build running build_py copying pdal/pdalconfig.py -> build/lib.linux-i686-2.7/pdal running build_scripts [...] python setup.py install \ --root="/tmp/pdal/pdal2-0.3.1/debian/pdal2/" \ --install-purelib=/usr/lib/python2.7/site-packages/ \ -f --prefix=/usr [...] running build running build_py running build_scripts [...] $ The stats of files are: File: «pdal/pdalconfig.py» Modify: 2011-11-21 13:44:52.497971724 +0100 File: «build/lib.linux-i686-2.7/pdal/pdalconfig.py» Modify: 2011-11-21 13:44:52.000000000 +0100 It doesn't copy in the install step because st_mtimes in newer() are the same: ST_MTIME-source- 1321879492 ST_MTIME-target- 1321879492 *Waiting a second between build and install: $debuild -us -uc [...] mkdir -p debian/python-module-stampdir cd . && \ python setup.py build \ --build-base="/tmp/pdal/pdal2-0.3.1/./build" running build running build_py copying pdal/pdalconfig.py -> build/lib.linux-i686-2.7/pdal running build_scripts [...] python setup.py install \ --root="/tmp/pdal/pdal2-0.3.1/debian/pdal2/" \ --install-purelib=/usr/lib/python2.7/site-packages/ \ -f --prefix=/usr [...] running build running build_py copying pdal/pdalconfig.py -> build/lib.linux-i686-2.7/pdal running build_scripts [...] $ Obviously the file has been copied as st_mtimes in newer() differ by a second ST_MTIME-source- 1321879603 ST_MTIME-target- 1321879602 > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue13420> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13420> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com