-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DEV: Update .gitpod.yml to build inplace #52719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -13,7 +13,7 @@ tasks: | |||
conda activate pandas-dev | |||
git pull --unshallow # need to force this else the prebuild fails | |||
git fetch --tags | |||
python setup.py build_ext -j 4 | |||
python setup.py build_ext --inplace -j 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't inplace already in pyproject.toml? just for my understanding, why is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in https://github.com/pandas-dev/pandas/pull/49917/files,
[build_ext]
inplace = True
in setup.cfg was changed to
# TODO: Remove after setuptools support is dropped.
[tool.setuptools]
include-package-data = true
in pyproject.toml
do they do the same thing?
the docs don't have --inplace
python setup.py build_ext -j 4 |
so does this need updating there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lithomas1 sorry for the ping, just trying to understand the above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the ping. This does indeed seem missing, but the old syntax seems to be distutils specific since I can't find anything on it in the setuptools docs.
(see https://docs.python.org/3/distutils/configfile.html).
Maybe we can update where we are overriding build_ext in setup.py to also pass through inplace=True as the default?
(here
Lines 76 to 104 in 11d75d8
class build_ext(_build_ext): | |
@classmethod | |
def render_templates(cls, pxifiles): | |
for pxifile in pxifiles: | |
# build pxifiles first, template extension must be .pxi.in | |
assert pxifile.endswith(".pxi.in") | |
outfile = pxifile[:-3] | |
if ( | |
os.path.exists(outfile) | |
and os.stat(pxifile).st_mtime < os.stat(outfile).st_mtime | |
): | |
# if .pxi.in is not updated, no need to output .pxi | |
continue | |
with open(pxifile) as f: | |
tmpl = f.read() | |
pyxcontent = Tempita.sub(tmpl) | |
with open(outfile, "w") as f: | |
f.write(pyxcontent) | |
def build_extensions(self): | |
# if building from c files, don't need to | |
# generate template output | |
if _CYTHON_INSTALLED: | |
self.render_templates(_pxifiles) | |
super().build_extensions() |
I'm not really inclined to change this, so a doc update should suffice (since this time, the meson build work should actually be ready, just waiting on a meson-python release).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as in, a doc update to add --inplace
to the build commands? sure, sounds good
(since this time, the meson build work should actually be ready, just waiting on a meson-python release).
ooh, exciting!
Because of the change in de0753e, we were not actually rebuilding the latest fetched pandas inplace.
Going to directly merge this since we are using this in a workshop.