solc-select


Namesolc-select JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/crytic/solc-select
SummaryManage multiple Solidity compiler versions.
upload_time2023-06-26 16:28:27
maintainer
docs_urlNone
authorTrail of Bits
requires_python>=3.6
licenseAGPL-3.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # solc-select
A tool to quickly switch between Solidity compiler versions.

The tool is split into two CLI utilities:
- `solc-select`: manages installing and setting different `solc` compiler versions
- `solc`: wrapper around `solc` which picks the right version according to what was set via `solc-select`

The `solc` binaries are downloaded from https://binaries.soliditylang.org/ which contains
official artifacts for many historial and modern `solc` versions for Linux and macOS.

The versioned binaries are stored in `~/.solc-select/artifacts/`.

## Quickstart

```
pip3 install solc-select
```

To automatically install and use a version, run `solc-select use <version> --always-install`. 

### Running on ARM (Mac M1/M2)

`solc` requires Rosetta to be installed. See the FAQ on [how to install Rosetta](#oserror-errno-86-bad-cpu-type-in-executable).

## Usage

The global version of `solc` can be set with the `solc-select use <version>` command:
```
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.5.2+commit.1df8f40c.Linux.g++
$ solc-select use 0.4.24
Switched global version to 0.4.24
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.4.24+commit.e67f0147.Linux.g++
```

Use `SOLC_VERSION` environment variable to override the global version:
```
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.4.24+commit.e67f0147.Linux.g++
$ SOLC_VERSION=0.5.2 solc --version
solc, the solidity compiler commandline interface
Version: 0.5.2+commit.1df8f40c.Linux.g++
```

You can list all available versions with `solc-select install`:
```
$ solc-select install
Available versions to install:
0.3.6
0.4.0
...
0.8.0
0.8.1
```

And install the one you need with `solc-select install <version>`:
```
$ solc-select install 0.8.1
Installing '0.8.1'...
Version '0.8.1' installed.
```

You can also install the latest version with `solc-select install latest`
and use the latest version with `solc-select use latest`

Display the currently installed versions:
```
$ solc-select versions
0.8.0
0.4.2 (current, set by /Users/artur/.solc-select/global-version)
```

## Getting Help

Feel free to stop by our [Slack channel](https://empirehacking.slack.com/) for help on using or extending `solc-select`.

## FAQ

### OSError: [Errno 86] Bad CPU type in executable

On newer `solc-select` versions, this might show as `solc binaries for macOS are
Intel-only. Please install Rosetta on your Mac to continue.`

`solc` requires Rosetta to be installed. To see whether you have Rosetta
installed on your Mac, run

```bash
pgrep -q oahd && echo Rosetta is installed || echo Rosetta is NOT installed
```

If it is not installed, it can be installed with the command

```bash
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
```

### solc-version not changing after running `solc-select use [version]` or setting `SOLC_VERSION`

Uninstall other installations of solc on your machine. `solc-select` re-installs solc binaries for your operating system and acts as a wrapper for solc. With duplicate solc installations, this may result in your `solc` version not being up to date.

### "Unsupported Platform" on Windows 

The solc-select version that supports Windows is currently in beta. Uninstall `solc-select` through `pip3 uninstall solc-select` and run 

```bash 
pip install solc-select==1.0.0b1
```

Alternatively, for the most up-to-date version, clone this repository and run 
```bash 
pip install . --user
```

## Known Issues

### `SSL: CERTIFICATE_VERIFY_FAILED` on running `solc-select` commands [investigation ongoing]

**OS X**
```bash
pip3 install certifi
/Applications/Python\ 3.8/Install\ Certificates.command
```

Python distributions on OS X has no certificates and cannot validate SSL connections, a breaking change introduced in Python 3.6. See [StackOverflow](https://stackoverflow.com/a/42334357) post for additional details.

### `Connection refused` [investigation ongoing]

```bash
pip3 uninstall solc-select 
pip3 install solc-select==0.2.0
solc-select install 
```

Try downgrading to `solc-select version 0.2.0`. 

Our `0.2.1` version of `solc-select` pulls older Linux binaries from [crytic/solc](https://github.com/crytic/solc) which seems to have introduced unexpected behavior in certain instances.

### `solc-select` version changes, but `solc --version does not match`

Users seem to be experiencing situations in which the following command is successful: 
```
solc-select use <version> 
```
However, when running the following command, it points to an older version of Solidity.
```
solc --version
```

`solc-select` is intended to work with custom binaries. This means that Solidity installed through other means (i.e: `brew install solidity`) will _not_ work!. 

Uninstall other versions Solidity from your computer.

## License

`solc-select` is licensed and distributed under the [AGPLv3](LICENSE) license. [Contact us](mailto:opensource@trailofbits.com) if you’re looking for an exception to the terms.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/crytic/solc-select",
    "name": "solc-select",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Trail of Bits",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/60/a0/2a2bfbbab1d9bd4e1a24e3604c30b5d6f84219238f3c98f06191faf5d019/solc-select-1.0.4.tar.gz",
    "platform": null,
    "description": "# solc-select\nA tool to quickly switch between Solidity compiler versions.\n\nThe tool is split into two CLI utilities:\n- `solc-select`: manages installing and setting different `solc` compiler versions\n- `solc`: wrapper around `solc` which picks the right version according to what was set via `solc-select`\n\nThe `solc` binaries are downloaded from https://binaries.soliditylang.org/ which contains\nofficial artifacts for many historial and modern `solc` versions for Linux and macOS.\n\nThe versioned binaries are stored in `~/.solc-select/artifacts/`.\n\n## Quickstart\n\n```\npip3 install solc-select\n```\n\nTo automatically install and use a version, run `solc-select use <version> --always-install`. \n\n### Running on ARM (Mac M1/M2)\n\n`solc` requires Rosetta to be installed. See the FAQ on [how to install Rosetta](#oserror-errno-86-bad-cpu-type-in-executable).\n\n## Usage\n\nThe global version of `solc` can be set with the `solc-select use <version>` command:\n```\n$ solc --version\nsolc, the solidity compiler commandline interface\nVersion: 0.5.2+commit.1df8f40c.Linux.g++\n$ solc-select use 0.4.24\nSwitched global version to 0.4.24\n$ solc --version\nsolc, the solidity compiler commandline interface\nVersion: 0.4.24+commit.e67f0147.Linux.g++\n```\n\nUse `SOLC_VERSION` environment variable to override the global version:\n```\n$ solc --version\nsolc, the solidity compiler commandline interface\nVersion: 0.4.24+commit.e67f0147.Linux.g++\n$ SOLC_VERSION=0.5.2 solc --version\nsolc, the solidity compiler commandline interface\nVersion: 0.5.2+commit.1df8f40c.Linux.g++\n```\n\nYou can list all available versions with `solc-select install`:\n```\n$ solc-select install\nAvailable versions to install:\n0.3.6\n0.4.0\n...\n0.8.0\n0.8.1\n```\n\nAnd install the one you need with `solc-select install <version>`:\n```\n$ solc-select install 0.8.1\nInstalling '0.8.1'...\nVersion '0.8.1' installed.\n```\n\nYou can also install the latest version with `solc-select install latest`\nand use the latest version with `solc-select use latest`\n\nDisplay the currently installed versions:\n```\n$ solc-select versions\n0.8.0\n0.4.2 (current, set by /Users/artur/.solc-select/global-version)\n```\n\n## Getting Help\n\nFeel free to stop by our [Slack channel](https://empirehacking.slack.com/) for help on using or extending `solc-select`.\n\n## FAQ\n\n### OSError: [Errno 86] Bad CPU type in executable\n\nOn newer `solc-select` versions, this might show as `solc binaries for macOS are\nIntel-only. Please install Rosetta on your Mac to continue.`\n\n`solc` requires Rosetta to be installed. To see whether you have Rosetta\ninstalled on your Mac, run\n\n```bash\npgrep -q oahd && echo Rosetta is installed || echo Rosetta is NOT installed\n```\n\nIf it is not installed, it can be installed with the command\n\n```bash\n/usr/sbin/softwareupdate --install-rosetta --agree-to-license\n```\n\n### solc-version not changing after running `solc-select use [version]` or setting `SOLC_VERSION`\n\nUninstall other installations of solc on your machine. `solc-select` re-installs solc binaries for your operating system and acts as a wrapper for solc. With duplicate solc installations, this may result in your `solc` version not being up to date.\n\n### \"Unsupported Platform\" on Windows \n\nThe solc-select version that supports Windows is currently in beta. Uninstall `solc-select` through `pip3 uninstall solc-select` and run \n\n```bash \npip install solc-select==1.0.0b1\n```\n\nAlternatively, for the most up-to-date version, clone this repository and run \n```bash \npip install . --user\n```\n\n## Known Issues\n\n### `SSL: CERTIFICATE_VERIFY_FAILED` on running `solc-select` commands [investigation ongoing]\n\n**OS X**\n```bash\npip3 install certifi\n/Applications/Python\\ 3.8/Install\\ Certificates.command\n```\n\nPython distributions on OS X has no certificates and cannot validate SSL connections, a breaking change introduced in Python 3.6. See [StackOverflow](https://stackoverflow.com/a/42334357) post for additional details.\n\n### `Connection refused` [investigation ongoing]\n\n```bash\npip3 uninstall solc-select \npip3 install solc-select==0.2.0\nsolc-select install \n```\n\nTry downgrading to `solc-select version 0.2.0`. \n\nOur `0.2.1` version of `solc-select` pulls older Linux binaries from [crytic/solc](https://github.com/crytic/solc) which seems to have introduced unexpected behavior in certain instances.\n\n### `solc-select` version changes, but `solc --version does not match`\n\nUsers seem to be experiencing situations in which the following command is successful: \n```\nsolc-select use <version> \n```\nHowever, when running the following command, it points to an older version of Solidity.\n```\nsolc --version\n```\n\n`solc-select` is intended to work with custom binaries. This means that Solidity installed through other means (i.e: `brew install solidity`) will _not_ work!. \n\nUninstall other versions Solidity from your computer.\n\n## License\n\n`solc-select` is licensed and distributed under the [AGPLv3](LICENSE) license. [Contact us](mailto:opensource@trailofbits.com) if you\u2019re looking for an exception to the terms.\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Manage multiple Solidity compiler versions.",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://github.com/crytic/solc-select"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27a6e2b2529f77431bd610de0a09d633768e9538f986fa606180b3b9a4a05a89",
                "md5": "e68a64bb00f849295657dfdb641145e4",
                "sha256": "9a28b8a612ff18a171929d23e2ed68a6263f4e11784fc47fa81476a3219874cb"
            },
            "downloads": -1,
            "filename": "solc_select-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e68a64bb00f849295657dfdb641145e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 20710,
            "upload_time": "2023-06-26T16:28:26",
            "upload_time_iso_8601": "2023-06-26T16:28:26.745655Z",
            "url": "https://files.pythonhosted.org/packages/27/a6/e2b2529f77431bd610de0a09d633768e9538f986fa606180b3b9a4a05a89/solc_select-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60a02a2bfbbab1d9bd4e1a24e3604c30b5d6f84219238f3c98f06191faf5d019",
                "md5": "1e430e6a4e5c2d8f555a710a3af61692",
                "sha256": "db7b9de009af6de3a5416b80bbe5b6d636bf314703c016319b8c1231e248a6c7"
            },
            "downloads": -1,
            "filename": "solc-select-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1e430e6a4e5c2d8f555a710a3af61692",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 21307,
            "upload_time": "2023-06-26T16:28:27",
            "upload_time_iso_8601": "2023-06-26T16:28:27.992206Z",
            "url": "https://files.pythonhosted.org/packages/60/a0/2a2bfbbab1d9bd4e1a24e3604c30b5d6f84219238f3c98f06191faf5d019/solc-select-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-26 16:28:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "crytic",
    "github_project": "solc-select",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "solc-select"
}
        
Elapsed time: 0.08980s