Skip to content

Conversation

@jjdenhup
Copy link

This should fix #37

Cause of this issue is that much of what robotframework-autoitlibrary does to install is deprecated and/or not recommend practices in newer pythons. A complete rewrite would be better, but I managed to get it working with fairly minimal changes:

  • Build.bat
    • updated to call python -m build instead, as calling setup.py directly is deprecated
    • NOTE it now outputs a tar.gz instead of a zip, and zip does not seem supported by build
  • Make.bat
    • libdoc.py call changed to newer libdoc.exe from robotframework.
    • removed both calls to setup.py, as calling directly is deprecated and it is unnecessary as libdoc does not require it; and build.bat does an install itself as part
  • setup.py
    • updated to work on Python 3.12 with setuptools, as distutils is obsolete and has been removed
    • changed logic to hook into cmdclass instead of relying on install param to be passed which does not occur any more
    • removed unneeded makepy.py call, as the lib does it automatically already at run time
    • added robotframework as a dependency
  • init.py
    • updated to remove libdoc warning about \R escape sequence

@lucyking
Copy link
Member

Hi @jjdenhup,
could you add this lines back to setup.py? since this lib only support Windows OS. remains code looks fine to me.

if os.name == "nt" :
   ......
else :
  print("AutoItLibrary cannot be installed on non-Windows platforms.")
  sys.exit(2)

@jjdenhup
Copy link
Author

Hi @jjdenhup, could you add this lines back to setup.py? since this lib only support Windows OS. remains code looks fine to me.

if os.name == "nt" :
   ......
else :
  print("AutoItLibrary cannot be installed on non-Windows platforms.")
  sys.exit(2)

Replaced. Sorry about that.

@lucyking lucyking merged commit fd6caf2 into nokia:master Oct 16, 2024
@lucyking
Copy link
Member

@jjdenhup Merged. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import AutoITLibrary error

2 participants