Skip to content
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

Fix Cython 3 problems #1523

Merged
merged 7 commits into from
Jul 23, 2023
Merged

Fix Cython 3 problems #1523

merged 7 commits into from
Jul 23, 2023

Conversation

heinezen
Copy link
Member

Cython 3 changes a few things which caused trouble in the builds.

@heinezen heinezen added lang: c++ Done in C++ code lang: python Done in Python code bugfix Restores intended behavior labels Jul 22, 2023
openage/main/main_cpp.pyx Show resolved Hide resolved
run.py.in Outdated
@@ -11,8 +11,12 @@ which satisifies that requirement.
"""

if __name__ == '__main__@SOME_UNDEFINED_VARIABLE_CMAKE_WILL_REMOVE@':
# This is stupid but without it, Cython/Python cannot find the openage module.
import sys
sys.path.append('./bin')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to either run it in bin/ or add
this path dynamically if we detect we're in the build dir currently- it shouldn't be generally added since this may be the installed openage binary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did run it in bin but it failed regardless. Don't know why but it worked before for earlier cython versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm well, but we shpuld try a proper fix (which may include adding py paths of course)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it to sys.path.append(os.getcwd()).

openage/convert/service/export/png/libpng.pxd Show resolved Hide resolved
@heinezen heinezen added the kevin-rebuild-pl0x instruct kevin to rebuild this pull request label Jul 23, 2023
@SFTbot SFTbot removed the kevin-rebuild-pl0x instruct kevin to rebuild this pull request label Jul 23, 2023
@TheJJ TheJJ merged commit 3ca720b into SFTtech:master Jul 23, 2023
12 of 13 checks passed
@heinezen heinezen deleted the cython3 branch October 15, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Restores intended behavior lang: c++ Done in C++ code lang: python Done in Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants