Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Draft: comment out problematic versioneer code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Nov 22, 2023
1 parent 85dfd00 commit 80114bc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dandi/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def main(ctx, log_level, pdb=False):

from ..utils import check_dandi_version

check_dandi_version()
# check_dandi_version()


#
Expand Down
2 changes: 1 addition & 1 deletion dandi/dandiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def __init__(
:param str token: User API Key. Note that different instance APIs have
different keys.
"""
check_dandi_version()
# check_dandi_version()
if api_url is None:
if dandi_instance is None:
instance_name = os.environ.get("DANDI_INSTANCE", "dandi")
Expand Down
8 changes: 4 additions & 4 deletions dandi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,10 @@ def _get_instance(
f" please contact that server's administrators: {e}"
)
our_version = Version(__version__)
if our_version < minversion:
raise CliVersionTooOldError(our_version, minversion, bad_versions)
if our_version in bad_versions:
raise BadCliVersionError(our_version, minversion, bad_versions)
# if our_version < minversion:
# raise CliVersionTooOldError(our_version, minversion, bad_versions)
# if our_version in bad_versions:
# raise BadCliVersionError(our_version, minversion, bad_versions)
api_url = server_info.services.api.url
if dandi_id is None:
dandi_id = api_url.host
Expand Down
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
# therein for more information.
sys.path.insert(0, os.path.dirname(__file__))

try:
import versioneer
version_config = versioneer.get_version()
cmdclass = versioneer.get_cmdclass()
except ImportError:
print("WARNING: failed to import versioneer, falling back to no version for now")
version_config = "0.4.0" # Fallback version
cmdclass = {}
# try:
# import versioneer
# version_config = versioneer.get_version()
# cmdclass = versioneer.get_cmdclass()
# except ImportError:
# print("WARNING: failed to import versioneer, falling back to no version for now")
# version_config = "0.4.0" # Fallback version
# cmdclass = {}

# Ensure the version is PEP 440 compliant
if '+' in version_config:
version_config = version_config.split('+')[0]
# if '+' in version_config:
# version_config = version_config.split('+')[0]

if __name__ == "__main__":
setup(
name="lincbrain",
version=version_config,
cmdclass=cmdclass,
version="0.6.0",
cmdclass={},
)

0 comments on commit 80114bc

Please sign in to comment.