Generalize meta_path json file creation in load.py [#4540]
{'login': 'VijayKalmath', 'id': 20517962, 'node_id': 'MDQ6VXNlcjIwNTE3OTYy', 'avatar_url': 'https://avatars.githubusercontent.com/u/20517962?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/VijayKalmath', 'html_url': 'https://github.com/VijayKalmath', 'followers_url': 'https://api.github.com/users/VijayKalmath/followers', 'following_url': 'https://api.github.com/users/VijayKalmath/following{/other_user}', 'gists_url': 'https://api.github.com/users/VijayKalmath/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/VijayKalmath/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/VijayKalmath/subscriptions', 'organizations_url': 'https://api.github.com/users/VijayKalmath/orgs', 'repos_url': 'https://api.github.com/users/VijayKalmath/repos', 'events_url': 'https://api.github.com/users/VijayKalmath/events{/privacy}', 'received_events_url': 'https://api.github.com/users/VijayKalmath/received_events', 'type': 'User', 'site_admin': False}
[]
[]
_The documentation is not available anymore as the PR was closed or merged._ @albertvillanova,  Can you please review this PR for Issue #4540  @lhoestq  Thank you for merging the PR . Is there a slack channel for contributing to the datasets library. I would love to work on the library and make meaningful contributions. Hi ! Sure feel free to join our discord ^^ 
https://discuss.huggingface.co/t/join-the-hugging-face-discord/11263 so that we can discuss together mor eeasily. Otherwise everything happens on github ;)
# What does this PR do?

## Summary

*In function `_copy_script_and_other_resources_in_importable_dir`, using string split when generating `meta_path` throws error in the edge case raised in #4540.*

## Additions
-

## Changes
- Changed meta_path to use `os.path.splitext` instead of using `str.split` to generalize code.

## Deletions
-
## Issues Addressed : 

Fixes #4540
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/4590/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/4590', 'html_url': 'https://github.com/huggingface/datasets/pull/4590', 'diff_url': 'https://github.com/huggingface/datasets/pull/4590.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/4590.patch', 'merged_at': '2022-07-07T13:17:44Z'}