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

platform==unsupported line preventing install #45

Closed
pmbarrett314 opened this issue Mar 13, 2023 · 4 comments · Fixed by #47
Closed

platform==unsupported line preventing install #45

pmbarrett314 opened this issue Mar 13, 2023 · 4 comments · Fixed by #47

Comments

@pmbarrett314
Copy link

The line in setup.cfg that prevents install on windows seems to be causing errors when trying to install on other platforms, I've tried pipx on mac and the standard AUR install on Arch. Others seem to be having the same issue. The root of the error seems to be the following. Just patching out the line lets me install just fine.

packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
    platform==unsupported;platform_system=="Windows"
@dontdieych
Copy link

Still got error on aarch64 archlinux.

AUR Explicit (1): dtrx-8.5.0-1
:: �[1mPKGBUILD up to date, skipping download: dtrx�[0m
  1 dtrx                                     (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> None
  1 dtrx                                     (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> None
==> Making package: dtrx 8.5.0-1 (Sun 23 Apr 2023 03:45:51 AM UTC)
==> Retrieving sources...
  -> Found dtrx-8.5.0.tar.gz
==> Validating source files with sha256sums...
    dtrx-8.5.0.tar.gz ... Passed
:: �[1m(1/1) Parsing SRCINFO: dtrx�[0m
==> Making package: dtrx 8.5.0-1 (Sun 23 Apr 2023 03:45:52 AM UTC)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found dtrx-8.5.0.tar.gz
==> Validating source files with sha256sums...
    dtrx-8.5.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting dtrx-8.5.0.tar.gz with bsdtar
==> Sources are ready.
==> Making package: dtrx 8.5.0-1 (Sun 23 Apr 2023 03:45:54 AM UTC)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/packaging/requirements.py", line 35, in __init__
    parsed = parse_requirement(requirement_string)
  File "/usr/lib/python3.10/site-packages/packaging/_parser.py", line 64, in parse_requirement
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
  File "/usr/lib/python3.10/site-packages/packaging/_parser.py", line 82, in _parse_requirement
    url, specifier, marker = _parse_requirement_details(tokenizer)
  File "/usr/lib/python3.10/site-packages/packaging/_parser.py", line 126, in _parse_requirement_details
    marker = _parse_requirement_marker(
  File "/usr/lib/python3.10/site-packages/packaging/_parser.py", line 147, in _parse_requirement_marker
    tokenizer.raise_syntax_error(
  File "/usr/lib/python3.10/site-packages/packaging/_tokenizer.py", line 163, in raise_syntax_error
    raise ParserSyntaxError(
packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier)
    platform==unsupported;platform_system=="Windows"
            ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/alarm/.cache/yay/dtrx/src/dtrx-8.5.0/setup.py", line 7, in <module>
    setuptools.setup()
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 78, in _install_setup_requires
    dist.parse_config_files(ignore_option_errors=True)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 887, in parse_config_files
    self._finalize_requires()
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 594, in _finalize_requires
    self._move_install_requirements_markers()
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 634, in _move_install_requirements_markers
    inst_reqs = list(_reqs.parse(spec_inst_reqs))
  File "/usr/lib/python3.10/site-packages/packaging/requirements.py", line 37, in __init__
    raise InvalidRequirement(str(e)) from e
packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
    platform==unsupported;platform_system=="Windows"
            ^
==> ERROR: A failure occurred in package().
    Aborting...
 -> error making: dtrx-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
dtrx - exit status 4

@noahp
Copy link
Member

noahp commented Apr 27, 2023

Thanks for reporting, this looks like a setuptools update is tripping over that. I'll push a fix up asap!

noahp added a commit that referenced this issue Apr 27, 2023
The hack to prevent installation on Windows no longer works. I didn't
track down the exact setuptools version where this starts failing, but
just fix the problem by using the `unsupported-python` dependency on
Windows.

Fixes #45 + #46
noahp added a commit that referenced this issue Apr 27, 2023
The hack to prevent installation on Windows no longer works. I didn't
track down the exact setuptools version where this starts failing, but
just fix the problem by using the `unsupported-python` dependency on
Windows.

Fixes #45 + #46
noahp added a commit that referenced this issue Apr 27, 2023
The hack to prevent installation on Windows no longer works. I didn't
track down the exact setuptools version where this starts failing, but
just fix the problem by using the `unsupported-python` dependency on
Windows.

Fixes #45 + #46
@pmbarrett314
Copy link
Author

Awesome, thanks!

@noahp noahp closed this as completed in #47 Apr 27, 2023
noahp added a commit that referenced this issue Apr 27, 2023
The hack to prevent installation on Windows no longer works. I didn't
track down the exact setuptools version where this starts failing, but
just fix the problem by using the `unsupported-python` dependency on
Windows.

Fixes #45 + #46
@noahp
Copy link
Member

noahp commented Apr 27, 2023

Published the fix in 8.5.1, also available in PyPI:
https://github.com/dtrx-py/dtrx/releases/tag/8.5.1

Thanks again for reporting, very appreciated!

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 a pull request may close this issue.

3 participants